fixed performance issue with huge vite bundle

This commit is contained in:
nvrl committed 2026-02-17 19:24:02 +01:00
1 parent ee8e51d891
commit 02f2866deb
1 file changed
+22 -1
+22 -1
View File
@@ -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
},
}
})