A performance budget nobody enforces is a wish. The only budget that survives a deadline is one the pipeline refuses to merge past. So we move the check left — into CI, on every pull request.
Make the machine say no
We fail the build when a route's JavaScript crosses its budget. The threshold lives in config next to the code, and size-limit runs as a required check:
[
{ "path": ".next/static/chunks/app/engineering-journal/**", "limit": "70 kB" }
]Server Components do the heavy lifting
The cheapest kilobyte is the one never shipped to the browser. Rendering on the server and shipping client islands only where interaction demands it keeps most routes near zero JavaScript — which is how a budget stays comfortable instead of constantly under threat.
- #Performance
- #CI/CD
- #Next.js