mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 05:56:29 +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,
|
sourcemap: false,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: {
|
manualChunks(id) {
|
||||||
'element-plus': ['element-plus'],
|
// Let Vite handle chunking automatically to avoid circular dependencies
|
||||||
'vue-vendor': ['vue', 'vue-router', 'pinia'],
|
// 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