JavaScript bundle size, explained without the jargon
The version of this that works is simpler than the version most people imagine. Here is JavaScript bundle size without the vocabulary that usually surrounds it.
The question is rarely whether something can be built, but what it costs to keep running afterwards. Anything you cannot measure here, you are deciding by taste, which is fine as long as everyone knows it.
The short version
Every kilobyte of JavaScript costs more than a kilobyte of image. None of that requires a large budget, only a decision and someone to own it. The failure mode is not doing it wrong, it is doing it once and assuming it stays done.
Why people complicate it
Most of the confusion comes from tooling rather than from the idea itself. It is worth being explicit about, because assumptions differ quietly.
Most sites ship libraries for features they barely use. Where this goes wrong is almost never a lack of knowledge. Assume whoever inherits this will have half your context and none of your patience.
Where to go from here
Measure the bundle before optimising anything else. That sounds obvious written down. It is still the thing most often skipped. It rarely shows up as a line item, which is exactly why it slips.
In practice
Code gets read far more often than it gets written, and usually by someone with less context than the author had. Three things worth confirming about JavaScript bundle size before you move on:
- Someone can say what the current setup is without going to look
- Every kilobyte of JavaScript costs more than a kilobyte of image — and you know whether that is true here
- There is a way to tell whether the last change to this helped
The point is not perfection, it is knowing which of these you have consciously chosen to skip.