Skip to content

Commit

Permalink
Merge pull request #10464 from marmelab/fix-demo-multiple-mui-packages
Browse files Browse the repository at this point in the history
Fix demo has multiple conflicting MUI packages
  • Loading branch information
fzaninotto authored Jan 23, 2025
2 parents 1879b43 + 552e6bf commit b6cd03a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ export default defineConfig(async () => {
// find: 'scheduler/tracing',
// replacement: 'scheduler/tracing-profiling',
// },
// The 2 next aliases are needed to avoid having multiple MUI instances
{
find: '@mui/material',
replacement: path.resolve(
__dirname,
'node_modules/@mui/material'
),
},
{
find: '@mui/icons-material',
replacement: path.resolve(
__dirname,
'node_modules/@mui/icons-material'
),
},
// we need to manually follow the symlinks for local packages to allow deep HMR
...Object.keys(aliases).map(packageName => ({
find: packageName,
Expand Down

0 comments on commit b6cd03a

Please sign in to comment.