diff --git a/packages/toolpad-app/src/server/toolpadAppBuilder.ts b/packages/toolpad-app/src/server/toolpadAppBuilder.ts index 06facf16ac0..2c021dc3226 100644 --- a/packages/toolpad-app/src/server/toolpadAppBuilder.ts +++ b/packages/toolpad-app/src/server/toolpadAppBuilder.ts @@ -220,6 +220,15 @@ export function createViteConfig({ }, }, }, + resolve: { + alias: [ + { + // FIXME(https://github.com/mui/material-ui/issues/35233) + find: /^@mui\/icons-material\/([^/]*)/, + replacement: '@mui/icons-material/esm/$1', + }, + ], + }, server: { fs: { allow: [root, path.resolve(__dirname, '../../../../')], diff --git a/packages/toolpad-app/tsup.config.ts b/packages/toolpad-app/tsup.config.ts index 47a23de664c..d13378285cc 100644 --- a/packages/toolpad-app/tsup.config.ts +++ b/packages/toolpad-app/tsup.config.ts @@ -53,6 +53,7 @@ export default defineConfig([ silent: true, outDir: 'dist/runtime', tsconfig: './tsconfig.esbuild.json', + clean: true, async onSuccess() { // eslint-disable-next-line no-console console.log('runtime: build successful');