From 82e987f41cff755dbeda9118e0cf3ceae3b6f254 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 4 Oct 2026 11:40:17 +0100 Subject: [PATCH] fix(web): split chart chunk with rolldown codeSplitting Vite 8 uses Rolldown, which rejects the object form of manualChunks. Move the chart.js chunk to build.rolldownOptions.output.codeSplitting. --- web/vite.config.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/vite.config.js b/web/vite.config.js index eec5c1b..0e39478 100644 --- a/web/vite.config.js +++ b/web/vite.config.js @@ -14,10 +14,15 @@ export default defineConfig({ outDir: 'dist', assetsDir: 'assets', emptyOutDir: true, - rollupOptions: { + rolldownOptions: { output: { - manualChunks: { - 'chart': ['chart.js'] + codeSplitting: { + groups: [ + { + name: 'chart', + test: /node_modules\/(chart\.js|@kurkle\/color)\// + } + ] } } }