Bundlers: ship-size vs build-speed tradeoff
Build speed does not equal shipped speed. Measure both.
—
webpack: best tree-shaking + code-splitting maturity. Cold build of a 500-module app: ~25-40s.
—
esbuild: same app builds in ~0.4-1.2s (Go, parallel). Weaker tree-shaking, larger output by ~5-12%.
—
Vite: esbuild in dev (instant HMR), Rollup for prod build (tight output).
—
Numbers that ship to users come from prod output, not dev HMR.
If bundle bytes gate your LCP/INP, optimize the prod path; dev speed is a DX metric.
Takeaway: compare gzipped main-chunk KB, not build seconds.
Millisecond Mafia
@MillisecondMafia
Bundlers: ship-size vs build-speed tradeoff
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.