Frontend Performance Budget
Workflow
- •Baseline current performance. Run production build and capture bundle outputs. Collect Lighthouse or Web Vitals measurements for key pages.
- •Compare against budgets. Check JS CSS image budgets and initial page weight thresholds. Flag regressions by route and entry chunk.
- •Apply targeted optimizations. Use route-level code splitting and lazy loading. Remove dead dependencies and optimize images and fonts. Memoize expensive renders only after profiling.
- •Re-measure. Run the same metrics after changes. Confirm budget compliance and no user-visible regressions.
- •Lock in protections. Add CI checks for bundle size and critical page performance.
Output Contract
Always include:
- •Before and after bundle and metric values.
- •Files or chunks driving regressions.
- •Optimization changes made and expected impact.
- •CI budget rules to enforce.