## Что это
F.2 — performance budget на frontend bundle: main initial chunk ≤ 200KB gzipped, LCP ≤ 2.5s на M2 MacBook Air baseline. Текущее состояние: ~340KB main, LCP ~3.1s. Меры:
1. Code-split: 6 artifact viewers — lazy chunks (E06 registry)
2. Tree-shake unused exports из `@rox-one/ui` через `sideEffects: false`
3. Заменить `lodash` на ESM-imports `lodash-es` или native
4. Заменить `moment` на `date-fns` (-150KB)
5. Defer non-critical: telemetry-init, embed-preload, settings-modal
6. Image optimization: SVG inline для ≤4KB, остальное lazy через `
![]()
`
7. CSS purge через Tailwind JIT
CI gate: bundle-analyzer на каждый PR сравнивает с baseline. PR с regression > 5KB main блокируется.
Компоненты: Vite config, `scripts/bundle-budget.ts`, GitHub Actions `bundle-check`.
## Зачем
LCP > 2.5s — это «slow» по Core Web Vitals (даже для desktop app, embed loads as web view, LCP применим). 200KB budget — industry-standard для performant SPA. Это F.2 explicit requirement и обязательное условие GA.
## Источники вдохновения
- [icantcodefyi/dot-matrix-animations](https://github.com/icantcodefyi/dot-matrix-animations) — agent-themed loaders ~4KB
- [intentui/intentui](https://github.com/intentui/intentui) — minimal-bundle React Aria primitives
- [agisota/typedora-ui](https://github.com/agisota/typedora-ui) — strictly-typed lightweight UI replacements
## 🔗 Linear
- [PZD-418](https://linear.app/kuhjie/issue/PZD-418) — backing ticket