Hacker News new | ask | show | jobs
by elondaits 1206 days ago
The reason for bundling is converting potentially hundreds of individual script files to an amount that’s more manageable with a browser, without suffering a cost from latency… not only optimizing code size. Also, besides tree-shaking there’s a big saving from minimization and removing development-only code.
2 comments

With HTTP/2 multiplexing the latency of fetching multiple files from the same server is not a big issue anymore: https://stackoverflow.com/a/30864259.

One can also argue that Minification is also not really that important with widespread new compression algorithms like Brotli.

EDIT: Also, see this very good argument in favor of multiple files: https://news.ycombinator.com/item?id=34997759

Sadly there's lots of people are overoptimizing all of these things for apps that serve 10 users.

If you serve 10 million users every byte counts, but 10? Use the cdn.