3 ms·
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 experie
by jsmith45 5y ago
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.
- sroussey 5y agoRight, 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.