Skip to content

Commit

Permalink
partially disable minification to prevent cryptic error stck traces
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny committed Jan 11, 2025
1 parent 7830626 commit 8c34a90
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default defineConfig({
],
publicDir: 'static',
build: {
sourcemap: true,
minify: 'esbuild',
sourcemap: false,
outDir: 'build',
chunkSizeWarningLimit: 2 * 1024,
rollupOptions: {
Expand All @@ -30,15 +31,21 @@ export default defineConfig({
if (/\/web\/src\/engine\/websites\//.test(id) && /\/[a-zA-Z0-9_-]+\.webp$/.test(id)) {
return 'WebsiteIcons';
}
}
}
}
},
},
},
},
esbuild: {
minifySyntax: true,
minifyWhitespace: true,
minifyIdentifiers: false,
keepNames: true,
},
optimizeDeps: {
// TODO: once carbon-componenets-svelte v1 is released, check if svelte optimize has been improved
// carbon-components-svelte is large, prebundle
include: ['carbon-components-svelte'],
// carbon-icons-svelte is huge and takes 12s to prebundle, better use deep imports for the icons you need
exclude: ['carbon-icons-svelte']
exclude: ['carbon-icons-svelte'],
}
});

0 comments on commit 8c34a90

Please sign in to comment.