3 ms·
I would like to see more of the performance issues addressed by browsers. It seems to me that a lot of what webpack does (and maybe more with direct access to J
by WorldMaker 9y ago
I would like to see more of the performance issues addressed by browsers. It seems to me that a lot of what webpack does (and maybe more with direct access to JS engine state) in terms of chunking the dependency graph are absolutely optimizations that browsers could do in static analysis stages in module loading, figuring out what to load immediately in the fast path and what to defer. Those sorts of optimizations may not be there on Day 1 of ESM support in browsers, but they could be eventually addressed.
I think HTTP/2 does help a lot, but it's also hard to tell right now because a lot of our collective development environments don't support HTTP/2 well (partly because of the security requirements). Also HTTP/2 could help with that from the other direction. Instead of a tool like webpack bundling chunks, it could offer the chunks as metadata for use in HTTP/2 Server Push.
- pluma 9y ago> HTTP/2 Server Push which, by the way, is nowhere near usable right now and has a lot of unanswered questions before becoming useful, let alone reliable. > It seems to me that a lot of what webpack does (and maybe more with direct access to JS engine state) in terms of chunking the dependency graph are absolutely optimizations that browsers could do in static analysis stages in module loading, figuring out what to load immediately in the fast path and what to defer. Those sorts of optimizations may not be there on Day 1 of ESM support in browsers, but they could be eventually addressed. Except that only concerns execution, not transfer. The browser can only do this when it's already too late. It needs the server to have shipped all the modules to have a fully module graph to work with. The PRPL answer seems to be to do this in the HTTP server instead. ...which of course means server-side build tools again, even if the PRPL advocates like to handwave them away by expecting the HTTP servers to take care of that.