chore: optimize build chunking to remove empty chunks and circular dependencies
This commit is contained in:
@@ -17,10 +17,13 @@ export default defineConfig({
|
||||
sourcemap: !!process.env.TAURI_DEBUG,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'react-vendor': ['react', 'react-dom'],
|
||||
'chart-vendor': ['recharts'],
|
||||
'motion-vendor': ['framer-motion'],
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('recharts') || id.includes('d3')) {
|
||||
return 'charts-vendor';
|
||||
}
|
||||
return 'vendor';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user