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,
|
sourcemap: !!process.env.TAURI_DEBUG,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: {
|
manualChunks(id) {
|
||||||
'react-vendor': ['react', 'react-dom'],
|
if (id.includes('node_modules')) {
|
||||||
'chart-vendor': ['recharts'],
|
if (id.includes('recharts') || id.includes('d3')) {
|
||||||
'motion-vendor': ['framer-motion'],
|
return 'charts-vendor';
|
||||||
|
}
|
||||||
|
return 'vendor';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user