Blog
Every byte earns its download
We used to cap our JavaScript at 15 kB and fail the build over it. A cap is the wrong question for a site worth looking at. Now the build keeps a ledger of what every file weighs, and nothing gets heavier without someone deciding it should.
A ceiling answers how small, but the question that matters is whether each byte deserves to be there. A WebGL shelf of records costs more than a page of text and is worth it; a framework that renders the same page of text is not, at any size. So the cap went, and a ledger took its place.
After Bun bundles each entry point and Tailwind CSS writes each stylesheet, the build compresses every file it ships, the way the host serves it, and compares the result with the weights committed in the repository. A new file, or one that grew, fails the build until someone accepts the new weight on purpose, and that acceptance lands in the diff where a reviewer sees it. Measuring compressed matters because that is what the browser downloads; keeping the numbers in the repository matters because a weight nobody chose is the one that creeps.
All posts