Live data from Hacker News

Webpack 5

webpack.js.org

11–20 of 182 posts

Re: Webpack 5

#11
Eventually the packing part can be done in a compiled language. https://github.com/evanw/esbuild is very fast at doing some things already but not others.

And I guess webpack wins because you can configure it to do anything easily already? And with compiled languages 'configurability' is hard to do?

Re: Webpack 5

#12
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

Why do you feel the need to upgrade to webpack 5? What particular feature do you need that justifies the upgrade?

Re: Webpack 5

#13
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

So far what I've been doing is keeping my webpack config as simple as possible (But one of my big pet peeves is when you clone a project and the installation says all you need to do is run make install or npm i, but in reality requires 20 google searches and an hour of banging your head to get the project running and even then you end up with 50 cryptic warning messages in your terminal so you don't even know if you did it correctly.

With a very simple webpack config you might lose out on optimizations but at least you can get just about anyone running a project locally and if things go awry you can generally pinpoint the problem to a specific line of configuration.

Re: Webpack 5

#14
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

The way you avoid problems with a .0.0 release is by not upgrading to a .0.0 release. You would have to do that by hand; npm and yarn have been pinning major versions for a long time now, so that upgrade only happens when you do it by hand. So if you don't want to deal with breaking changes, all you have to do is nothing. Meantime webpack 4 is not going anywhere.

I'm reminded of when npm released 5.7.0 (which some got upgraded to automatically because it wasn't tagged as pre-release) and had a critical bug that deleted your system files.

https://news.ycombinator.com/item?id=16435305

Re: Webpack 5

#15
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

Webpack is kind of more "build your own bundler" than a bundler. The configurability and extensibility is immense and with that level of complexity, it's guaranteed things won't work smoothly for everyone (incompatible plugins, unexpected configurations etc.). Anyway, every big project always has hiccups with new major X.0.0 release.

Think about your own code for a second. It's typically a well defined code that doesn't have to accommodate a combinatorial explosion of configurations. It is bug free?

Keep in mind that 90% of code is written by one guy. It's not Webpack Corp. with a legion of QA testers.

Re: Webpack 5

#16
post #5

I’m scrolling and scrolling waiting for a paragraph that tries to sell me on why I’d bother and risk upgrading. I think the best I got were patch notes. Any good reason to upgrade?

Per https://webpack.js.org/blog/2020-10-10-webpack-5-release/#ge... : - Improve build performance with Persistent Caching. - Improve Long Term Caching with better algorithms and defaults. - Improve bundle size with better Tree Shaking and Code Generation. - Improve compatibility with the web platform. - Clean up internal structures that were left in a weird state while implementing features in v4 without introducing…

Are there any benchmarks to get a rough idea on how much improvement in all these areas we can expect to get by upgrading?

Re: Webpack 5

#17
post #2

"There is a good chance that upgrading fails and you would need to give it a second or 3rd try." Sad that this has almost become the norm when developing in the modern javascript ecosystem. I dread touching those projects and creating one even more because stuff just rots away and your app might break in days, weeks or If you are lucky months. I'm sure there are better developers out there that can handle all of this…

I know the feeling. It's not just modern stuff, I have an old ExtJS app that I dread to update. The best solution I have found is a dev / build environment in a dedicated VM that I can spin up once or twice a year to make updates. Bringing libraries up to date is a fucking nightmare and often a waste of time. For continuously updated apps I have moved away from complicated build processes. Most web apps are fine without a build process, I think there is a lot of premature optimization going on.

Re: Webpack 5

#19
post #5

I’m scrolling and scrolling waiting for a paragraph that tries to sell me on why I’d bother and risk upgrading. I think the best I got were patch notes. Any good reason to upgrade?

Per https://webpack.js.org/blog/2020-10-10-webpack-5-release/#ge... : - Improve build performance with Persistent Caching. - Improve Long Term Caching with better algorithms and defaults. - Improve bundle size with better Tree Shaking and Code Generation. - Improve compatibility with the web platform. - Clean up internal structures that were left in a weird state while implementing features in v4 without introducing…

I've heard that build performance is actually worse than webpack 4, if you're not using persistent caching. See: https://twitter.com/FredKSchott/status/1314220659984146432
Post reply on HN