Optimize bundle size — main chunk is 909KB #2

Closed
opened 2026-05-15 05:07:30 +00:00 by Mark · 1 comment
Owner

The production build outputs a single index.js chunk of ~909KB (262KB gzipped). This exceeds the 500KB warning threshold and will impact mobile load times.

Suggested approaches:

  1. Use dynamic import() for page components (Home, People, Dates, Settings, LogInteraction, PersonDetail)
  2. Configure build.rollupOptions.output.manualChunks in vite.config.ts to split vendor libraries (react, framer-motion, recharts, date-fns)
  3. Consider tree-shaking unused recharts components if only a subset is used

Target: get initial chunk under 200KB gzipped.

File to modify: vite.config.ts

The production build outputs a single `index.js` chunk of ~909KB (262KB gzipped). This exceeds the 500KB warning threshold and will impact mobile load times. Suggested approaches: 1. Use dynamic `import()` for page components (Home, People, Dates, Settings, LogInteraction, PersonDetail) 2. Configure `build.rollupOptions.output.manualChunks` in `vite.config.ts` to split vendor libraries (react, framer-motion, recharts, date-fns) 3. Consider tree-shaking unused recharts components if only a subset is used Target: get initial chunk under 200KB gzipped. File to modify: `vite.config.ts`
Author
Owner

Fixed in commit. Closing.

Fixed in commit. Closing.
Mark closed this issue 2026-05-16 04:37:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#2
No description provided.