Summary
The repo has no bundle-size budget or regression test in CI. The Vercel previews show size only on click-through; contributors have no automated warning when a commit fattens the bundle, and no historical size trend for comparison.
What goes wrong
Related active issues that would benefit from this (making them observable and prioritizable):
Suggested fix
Add one or both:
- Bundle-size budget CI check using
size-limit or @next/bundle-analyzer:
# .github/workflows/pr.yaml (new job)
bundle-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
…with per-route budgets in size-limit.config.js.
- Lighthouse CI on the Vercel preview URL for perf + bundle metrics, posting a PR comment with the deltas.
Start with budgets based on current sizes (First Load JS per route from next build output); ratchet down over time.
Severity
Low — nice-to-have, becomes higher ROI once #669 / #773 / MarkdownFormatter dedupe (#990) land and you want to lock in the wins.
Relates to
#669, #773, #990.
Summary
The repo has no bundle-size budget or regression test in CI. The Vercel previews show size only on click-through; contributors have no automated warning when a commit fattens the bundle, and no historical size trend for comparison.
What goes wrong
rehype-rawwas carried as a dep after PR Fix 11 bugs from audit (security + correctness) #992 stopped using it;react-plotly.jslingers pending migration in Remove react-plotly.js once all migratable charts are done #669;react-syntax-highlighterlingers pending Replace react-syntax-highlighter with Prism.js after Tailwind migration #773) accumulate silently.package.jsonwithout any indicator of their bundle impact.Related active issues that would benefit from this (making them observable and prioritizable):
Suggested fix
Add one or both:
size-limitor@next/bundle-analyzer:…with per-route budgets in
size-limit.config.js.Start with budgets based on current sizes (
First Load JSper route fromnext buildoutput); ratchet down over time.Severity
Low — nice-to-have, becomes higher ROI once #669 / #773 / MarkdownFormatter dedupe (#990) land and you want to lock in the wins.
Relates to
#669, #773, #990.