Skip to content

Commit

Permalink
Fix broken preview in vite runtime (#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored May 10, 2023
1 parent 2185011 commit 2033711
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/toolpad-app/src/server/toolpadAppBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, '../../../../')],
Expand Down
1 change: 1 addition & 0 deletions packages/toolpad-app/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 2033711

Please sign in to comment.