mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed performance issue with huge vite bundle
This commit is contained in:
1 parent
ee8e51d891
commit
02f2866deb
1 file changed
+22
-1
+22
-1
@@ -12,6 +12,27 @@ export default defineConfig(({ mode }) => {
|
||||
server: {
|
||||
host: true, // Allow external access
|
||||
allowedHosts: allowedHosts,
|
||||
}
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('@mui')) {
|
||||
return 'vendor-mui';
|
||||
}
|
||||
if (id.includes('react')) {
|
||||
return 'vendor-react';
|
||||
}
|
||||
if (id.includes('axios') || id.includes('i18next')) {
|
||||
return 'vendor-utils';
|
||||
}
|
||||
return 'vendor';
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
chunkSizeWarningLimit: 1000, // Increase limit slightly as well
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user