Live data from Hacker News

Webpack 5

webpack.js.org

31–40 of 182 posts

Re: Webpack 5

#31

I have to sing some praises for Webpack for a second. I work at a company with a large (> 10k files) old (> 10 years) JS codebase. It used to rely on a home-grown build tool, but making our builds both fast and modern took the time of multiple full-time engineers. Webpack isn't "fast" like Rust is fast, and it's not old enough to be as well-documented or understandable as I'd wish, but: 1. it is flexible enough to fi…

I don't use webpack anymore, but I have to say it was nice reading your story, I aspire to build a product which users will appreciate like this.

Re: Webpack 5

#33
post #26

Earlier quoted context omitted.

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

The only benchmark that matters is how much more money you will make from customers after upgrading.

Put that coffee down! Coffee is for closers only.

Re: Webpack 5

#34
I've been putting off learning Webpack for far too long.

Can anyone provide some kind of a syllabus to help me figure out what there is to learn about it, starting from almost no knowledge at all?

I feel like it's a critical enough piece of modern web infrastructure that it's worth me taking the time to fully understand how to use it and what it's capable of.

Re: Webpack 5

#35
post #34

I've been putting off learning Webpack for far too long. Can anyone provide some kind of a syllabus to help me figure out what there is to learn about it, starting from almost no knowledge at all? I feel like it's a critical enough piece of modern web infrastructure that it's worth me taking the time to fully understand how to use it and what it's capable of.

Nah.

EDIT: ok, some more context. You should be glad you haven’t had to deal with this shit show yet. Don’t walk willingly into it, there are much less painful tools like Rollup, Vite and Parcel around.

Re: Webpack 5

#36
post #27
post #15

Earlier quoted context omitted.

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 does…

Run it three times however is not part of such bugginess though. It means that they're randomly encountering different executions/run-states on what should be the same config/setup, each time you run it. And they have no idea why. Or they're running things in parallel, and encountering data races and such, and randomly working as a result. But the real concern is that they don't really know what a correct installatio…

I think it’s more if 5.0.0 doesn’t work the first time, you could simply let the community find those issues for you and by 5.0.xx it will mostly likely cover your specific setup (except for the documented api changes)

Re: Webpack 5

#37
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…

Out of curiosity is patching and updating all packages also a common consistent issue? Is there regularly breaking changes?

Re: Webpack 5

#38
As someone who fought battles with webpack and webpack 2, I’ve since been pleasantly surprised that each upgrade has just gotten simpler and more stable, and I can progressively delete more of my own code as the features get built in. Big thanks to the maintainers!

Re: Webpack 5

#39
The last time I tried to bump webpacker from 3 to 4 at was absolute hell. The fancy chunk splitting logic was spewing out non-deterministic bundles across different machines in our infra. Took a lot of deep digging in the internal graph representation to find the root cause.

I gave a local related meetup talk, slides here.

https://vheis.su/slides/curing-webpack-cancer/#11

Re: Webpack 5

#40
post #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…

I've found that a slightly longer (~100 lines) webpack config allows me to use all the caching and fancy tricks I want and is still just as debuggable. I think the main thing is setting it up yourself so you know what all the plugins/settings do.
Post reply on HN