What to do when your bundle needs to go on a diet
summary
Uses a bundle analyzer and runtime inspection to find heavy modules: CodeMirror and KaTeX pulled in through a Markdown component. Replaces that component with a lightweight BaseMarkdown to cut the landing bundle from 571 KB to 153.5 KB (~4×). On the profile page, extracts a homework variable into a utility, wraps heavy child components, and switches the payment modal to lazy-loading with prefetch to reduce the profile bundle from 975 KB to 363 KB and remove about 370 modules.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 3:06Bundle analysis with BundleAnalyzer
- 8:26Using Stethoscope tool
- 13:34Bundle optimization results
- 14:49Q&A








