From 02f2866deb321e3404e5dd4b50f1a7de635fc0f2 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Tue, 17 Feb 2026 19:24:02 +0100 Subject: [PATCH] fixed performance issue with huge vite bundle --- frontend/vite.config.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 28cb896..d2aec27 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -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 + }, } })