Bundle Baseline — 2026-07-07
Reference numbers for the performance TODO (
performance-improvements-todo.md). Re-measure against this after each work block.
Build: npm run build:analyze (Next.js 16.2.10, webpack, production).
Note: Next.js 16 removed the per-route size / First Load JS columns from
next build output (deemed inaccurate with RSC). The numbers below are
computed from .next/build-manifest.json and the emitted chunk files;
analyzer reports live in .next/analyze/ (regenerate with the same command).
Shared first-load JS (every app route ships this)
From build-manifest.json → rootMainFiles:
| Chunk | Raw | Gzipped |
|---|---|---|
webpack-*.js | 6.7 KB | 3.8 KB |
4bd1b696-*.js (React/framework) | 195.2 KB | 62.1 KB |
3794-*.js (shared app/vendor) | 217.5 KB | 59.8 KB |
main-app-*.js | 0.5 KB | 0.2 KB |
| Total | 420.0 KB | 125.9 KB |
Whole client build: 243 JS chunks, 3,206 KB raw.
Largest chunks (raw, on-demand unless noted)
| Chunk | Raw | Contains |
|---|---|---|
8600-*.js | 757.4 KB (266.8 KB gz) | monaco-editor, sanitize-html, handlebars |
1683-*.js | 370.2 KB (109.7 KB gz) | libphonenumber-js, jszip |
1863-*.js | 252.6 KB | qrcode, handlebars |
3794-*.js | 217.5 KB | shared (in first load) |
4bd1b696-*.js | 195.2 KB | React framework (in first load) |
framework-*.js | 185.3 KB | React framework |
5205-*.js | 137.7 KB | — |
main-*.js | 129.9 KB | webpack runtime + chunk map |
polyfills-*.js | 110.0 KB | — |
574-*.js | 94.6 KB | @clerk/nextjs |
9055-*.js | 70.3 KB | @mui/material |
Findings against the TODO gates
- 2.2 Monaco: chunk
8600is async/on-demand — not inrootMainFilesand not referenced by any route'spage_client-reference-manifest; only the webpack runtime chunk map inmain-*.jsknows its URL. Monaco is bundled locally (served from/_next/static/chunks/), not CDN. The barrel export does not put Monaco in any route's first load → restoringnext/dynamicis not needed for first-load reasons. Caveat:8600also carriessanitize-html+handlebars; whichever route imports those client-side pulls the whole 757 KB chunk. - 2.3 Clerk localizations: not present in any client chunk — the ~50
locale imports in
[locale]/layout.tsxcost server module evaluation and RSC payload only (a single locale object crosses to the client). Client bundle is unaffected; the per-locale import remains a server-side win. - 2.4 Small deps:
i18n-iso-countries— not in any client chunk (server-only, confirmed).libphonenumber-js+jszip— client-side in async chunk1683(370 KB raw); subset entry point for libphonenumber is the candidate.qrcode,handlebars,sanitize-html— present in client chunks (1863,8600), contrary to the "stay server-only" assumption; worth tracing which client imports pull them.