Search posts, tags, users, and pages
How do you feel about HTTP/2.0? Considering things like: the bundling stuff isn't so "necessary", etc.
It's true some of the current best practices will change once HTTP/2.0 becomes prevalent. The problem is legacy support. I have a feeling we might need bundlers for quite a while.
Especially the streaming nature of HTTP/2.0 is neat. Loading a lot of small assets now would be a no go while it would be completely acceptable in HTTP/2.0 environment.
A lot depends on how soon clients adopt compatible browsers. Perhaps in some niche cases going full HTTP/2.0 would be acceptable already.
In my opinion it’s still necessary. Minimizing and Compression is more efficient when bundled. But HTTP2 offers more chances to optimize the output. I. e. we can create more output files to leverage better caching. webpack could emit a push configuration, which tells the server something about the dependency tree (good that we have a single dependency tree for JS, CSS and images).
Good question! And I already had some discussions about this.
I think, HTTP2 will not remove the need for tools like webpack. Webpack is not merging all JS files into one big chunk because of HTTP1. The main problem is the round-trip. For example: After you've send main.js to the client, the client figures out that it requires bootstrap.js as well and he requests it. Then you send bootstrap.js and after that, the client figures out that it also requires router.js and so on.
There's even a chance that HTTP2 will increase the need for a bundler. For example: If you want to levarage server push, you need to know your dependency graph. The dependency graph basically says: when the user requests index.html, he probably also needs main.js, bootstrap.js, router.js. This is only possible when you're using a tool which is able to process the AST and extract references on dependencies.
You could also do that based on statistics. But I still think it's pretty useful to have a tool which "understands" your source code and is able to perform some customizations on it (like C++ programers like to use preprocessor directives).
flexbox all the things