mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
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.
This commit is contained in:
parent
a518b683c9
commit
af7e8f1dd8
1 changed files with 5 additions and 0 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue