diff --git a/examples/demo/vite.config.ts b/examples/demo/vite.config.ts index a76be56db8..be6fe808cd 100644 --- a/examples/demo/vite.config.ts +++ b/examples/demo/vite.config.ts @@ -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,