News for hackers. Stuff that matters.
Re:Rust Is the Future of JavaScript Infrastructure by jsmith45 on Thursday November 11, 2021 @04:39PM (#29193525)
The Rollup tool supports that in conjunction with the `preserveModules` option. I've never used it outside of playing around, so can't vouch for it from experience, but yeah it exists. It can also do more of course, like convert to older module formats or the like, but obviously you don't need to use that.

The biggest downside is that even in http2 or http3, bundles can still perform better in terms of lower overall loading times, since individual modules you need to download the first one, and perform at least a bit of parsing to find the other modules statically imported before you can start downloading those, repeat.

Re:Rust Is the Future of JavaScript Infrastructure by sroussey on Monday November 15, 2021 @12:49PM (#29230160)
Right, though you could use HTTP2 push, but to do that right… you would need a tool to know which files are bundled and their order and… it looks like today.

With one exception though… cache invalidation of a single source file would not invalidate an entire bundle or chunk.