From af7e8f1dd8f5d2ba42c7fc9465ae607011f3331b Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 25 May 2026 04:25:18 +0200 Subject: [PATCH] build(frontend): split Recharts + d3 deps into vendor-recharts chunk Pulls Recharts (~75KB gzip) and its d3-shape/array/color/path/scale + victory-vendor deps out of the catch-all vendor chunk so they load on demand on the three pages that use Sparkline (SystemHistoryModal, XrayMetricsModal, NodeHistoryPanel) and cache independently from the rest of the panel JS. --- frontend/vite.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 96117856..bc033754 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -203,6 +203,11 @@ export default defineConfig({ || id.includes('/node_modules/swagger-ui/') || id.includes('/node_modules/swagger-client/') ) return 'vendor-swagger'; + if ( + id.includes('/node_modules/recharts/') + || id.includes('/node_modules/victory-vendor/') + || id.includes('/node_modules/d3-') + ) return 'vendor-recharts'; if (id.includes('dayjs')) return 'vendor-dayjs'; if (id.includes('axios')) return 'vendor-axios'; return 'vendor';