Skip to content

Commit

Permalink
Update vite.config.js
Browse files Browse the repository at this point in the history
chunking and dependency size observability
Update vite.config.js
  • Loading branch information
epreston committed Nov 7, 2023
1 parent f629f32 commit 0f1673c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ export default defineConfig({
'chrome112',
'safari16.4',
'ios16.4'
]
],
chunkSizeWarningLimit: 800,
rollupOptions: {
output: {
// chunking and dependency size observability
manualChunks: (id) => {
// create chunk for playcanvas extras deps.
if (id.includes('extras') || id.includes('mini-stats')) {
return 'extras';
}
// create chunk for playcanvas engine deps.
if (
id.includes('playcanvas') ||
id.includes('@playcanvas')
) {
return 'engine';
}
}
}
}
}
});

0 comments on commit 0f1673c

Please sign in to comment.