Render-blocking CSS and JavaScript, and the bundle behind it
page-level attributionFirst Contentful Paint 4,189ms → 830ms, and initial JS 148.0 kB → 108.9 kB gzip
What was wrong, and what we did
- What was wrong
- A carousel stylesheet in a plain <link>, then jQuery and its plugin as classic <script> tags with no defer — the parser stops four times before it can paint. Behind them, lodash imported wholesale for one string operation and Moment with every locale for one date.
- What we did
- The whole legacy stack removed rather than deferred. The gallery is a native CSS scroll-snap row, the date comes from Intl.DateTimeFormat, and route CSS is inlined into the HTML rather than fetched. Nothing on the critical path that is not the page.
How it was measured. Lighthouse CI, median of 3 runs, mobile + devtools throttling + 4× CPU — the reports in section 03. Bundle figures from `pnpm perf:assert`, gzip level 9, measured off .next/.