mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 14:06:28 +00:00
build: improve manual chunking for better dependency management
This commit is contained in:
+10
-3
@@ -28,9 +28,16 @@ export default defineConfig({
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'element-plus': ['element-plus'],
|
||||
'vue-vendor': ['vue', 'vue-router', 'pinia'],
|
||||
manualChunks(id) {
|
||||
// Let Vite handle chunking automatically to avoid circular dependencies
|
||||
// Element Plus will be bundled with its dependencies in the correct order
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('element-plus')) {
|
||||
return 'element-plus'
|
||||
}
|
||||
// Group all other vendor code together
|
||||
return 'vendor'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user