What they're testing
Whether you know which tool shows what's heavy, and whether you separate bundle size from what actually loads.
The short answer~30 seconds
Run a bundle analyzer first — there's always a surprise. Four directions by effectiveness: remove or replace a heavy library (moment, all of lodash, an icon set imported wholesale), split by route and by interaction, verify tree shaking actually works, and only then compression. But the number that matters isn't the total — it's the JavaScript on the critical path to first render. 2MB across 20 lazy chunks is a different thing from 2MB in one file.
The long answer
On libraries, three familiar culprits: moment.js dragging every locale (replace with date-fns or the browser's built-in Intl), import _ from 'lodash' pulling the whole library instead of one function, and icon sets imported as import { Icon } from 'lib' where the library isn't tree-shakeable. Quick check: does the library's package.json declare "sideEffects": false and ship an ESM build — missing either means tree shaking can do almost nothing.
Code splitting pays along two axes. By route is obvious: the checkout page doesn't need the admin code. By INTERACTION is less common and often bigger: a rich-text editor, a charting library, a map — all can load when the user opens them rather than on page load. A 300KB chart that 90% of users never scroll to is 300KB wasted.
Beware over-splitting: each chunk is a request, and while HTTP/2 makes that cheaper it isn't free — there's still parse cost and dependency bookkeeping. The pragmatic threshold is not creating chunks under about 20KB; merging the small ones is usually faster than separating them.
What they'll ask next
?What size is good enough?
There's no universal number, but a common marker is under about 170KB compressed on the path to first render, which is a few seconds on a slow 3G connection. More important than the number is a CI budget so it can't creep up quietly.
These lose points
- Cutting the bundle without re-measuring real load time. Smaller doesn't automatically mean faster for users.