Myth: HTTP/2 killed bundling, ship many small files
Unbundled 1 file into 60 modules: transfer same, TBT 180ms -> 340ms.
HTTP/2 multiplexing removed the per-request connection penalty, so the old "concatenate everything" rule loosened. But it didn't make 60 files free.
— Each module is a separate parse+compile unit; per-file overhead and import resolution add main-thread cost.
— Compression also worse: 60 small files brotli to ~12% larger than one stream (less shared dictionary window).
Moderate bundling still wins; the right number is dozens, not hundreds, not one.
Takeaway: over-splitting cost +160ms TBT and +12% bytes.
Millisecond Mafia
@MillisecondMafia
Myth: HTTP/2 killed bundling, ship many small files
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.