Bundle shrinkage: довести initial JS до 200KB target
## Что это
Текущий initial-load bundle — 354KB JS (gzipped). Target — 200KB. Дельта 154KB надо найти. Vision:
- Lazy DesignPanel — расширить на all secondary panels
- Lazy adapters viewer registry с manualChunks + dynamic import()
- Code-split routes через TanStack Router
- Treeshake unused deps: bundle-analyzer report → identify top-5 «жирных» imports
- Replace heavy libs: date-fns → small alt, lodash → es-toolkit, etc.
- Async splash-screen для slow networks
- Preconnect hints для critical fetches
- Lighthouse CI gate: blocks merge при bundle > target +5% margin
- Bundle budget gate: per-package thresholds
## Зачем
Bundle size = first-paint time. На slow connections / underpowered laptops каждый KB important. 200KB-budget — это норма для современных productivity-apps (Linear, Notion, Figma desktop). 354KB — это too long-tail для first-time user experience.
Target: LCP ≤ 2.5s, INP ≤ 200ms на P75 user.
## Источники вдохновения
- [openclaw/clownfish](https://github.com/openclaw/clownfish)
- [mimecuvalo/all-the-things](https://github.com/mimecuvalo/all-the-things)
- [linear/linear-release](https://github.com/linear/linear-release)
## 🔗 Linear
- [PZD-362](https://linear.app/kuhjie/issue/PZD-362) — backing ticket
Log in to comment and vote
No comments yet
Be the first to share your thoughts.