perf: configure manualChunks for vendor library splitting#16
Conversation
Split heavy deps into separate cacheable chunks: - vendor-three: three + @react-three/fiber + @react-three/drei (~500 KB) - vendor-motion: framer-motion (~50 KB) - vendor-charts: recharts + d3-* (~80 KB) - vendor-radix: all 25 @radix-ui packages (~120 KB) - vendor-react: react + react-dom (~45 KB) - vendor-query: @tanstack/react-query (~30 KB) - vendor-forms: react-hook-form + zod (~25 KB) Closes XortexAI#3
|
@ali-imtiyazkhan is attempting to deploy a commit to the ishaanxgupta's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
| Filename | Overview |
|---|---|
| vite.config.ts | Adds manualChunks to Rollup output for vendor library splitting; logic is well-ordered with a catch-all fallback; no correctness issues found |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[module id] --> B{three or react-three?}
B -->|yes| C[vendor-three]
B -->|no| D{framer-motion?}
D -->|yes| E[vendor-motion]
D -->|no| F{recharts or d3 or victory?}
F -->|yes| G[vendor-charts]
F -->|no| H{radix-ui?}
H -->|yes| I[vendor-radix]
H -->|no| J{react or react-dom?}
J -->|yes| K[vendor-react]
J -->|no| L{tanstack?}
L -->|yes| M[vendor-query]
L -->|no| N{hookform or zod?}
N -->|yes| O[vendor-forms]
N -->|no| P{any node_modules?}
P -->|yes| Q[vendor catch-all]
P -->|no| R[app code]
Reviews (2): Last reviewed commit: "style: add missing trailing newline to v..." | Re-trigger Greptile
|
LGTM! |
|
Hi @ali-imtiyazkhan this actually created a circular dependency conflict and broke Prod |
|
Hi @ishaanxgupta, Thanks for catching that. I wasn't able to reproduce it locally, so I'll review PR #18 to understand the circular dependency and learn what went wrong. |
Split heavy deps into separate cacheable chunks:
Closes #3