- Main bundle (index): < 25KB (Currently: ~19KB)
- Vendor React chunk: < 65KB (Currently: ~60KB)
- Vendor Stacks chunk: < 50KB (Currently: ~48KB)
- Total initial JS before interaction: < 150KB
- @walletconnect/universal-provider: ~105KB - loaded on first auth attempt
- @reown/appkit: ~58KB - loaded on first auth attempt
- Route components: 2-7KB each - loaded on navigation
- SendTip: ~5.7KB
- RecentTips: ~5.6KB
- TipHistory: ~4.5KB
- TelemetryDashboard: ~6.7KB
- Wallet connect modules: Lazy loaded on auth
- @stacks/connect: Dynamically imported
- @reown/appkit: Dynamically imported via @stacks/connect
- web-vitals: Deferred to after render
- LCP (Largest Contentful Paint): < 2.5s
- FID (First Input Delay): < 100ms
- CLS (Cumulative Layout Shift): < 0.1
- Add bundle visualizer
- Lazy load wallet dependencies
- Remove framer-motion (replaced with CSS)
- Split vendor chunks
- Defer @stacks/connect loading
- Lazy load route components
- Remove unused imports
- Add preconnect hints
Bundle size is tracked via:
- Vite build output
- rollup-plugin-visualizer (dist/stats.html)
- CI workflow bundle size check
- Manual review before deployment
npm run build # Production build
npm run build:analyze # Build with bundle analysisInitial bundle contains:
- App shell and routing (lazy)
- Context providers
- Common utilities
- CSS
Deferred until needed:
- Wallet connection (@stacks/connect)
- Route components
- web-vitals reporting