From 2873d8c8b0fbc670606232030df8a9709f8f02b4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 15:41:39 +0000 Subject: [PATCH] fix(frontend): give Vite a manualChunks function so the build works on Vite 6 and 8 Vite 8 builds with Rolldown, which rejects the object form of build.rollupOptions.output.manualChunks (TypeError: manualChunks is not a function). The function form keeps the same plotly chunk on both. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7ZkJwTENF5faco36Cn5 --- frontend/vite.config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index e25db006..fb3d2824 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -9,8 +9,9 @@ export default defineConfig({ sourcemap: false, rollupOptions: { output: { - manualChunks: { - plotly: ['plotly.js-dist-min'], + // A function, because Rolldown (Vite 8) rejects the object form that Rollup accepts. + manualChunks(id: string) { + if (id.includes('/node_modules/plotly.js-dist-min/')) return 'plotly' }, }, },