r/node • • Oct 11 '20

Webpack 5 Headache

https://blog.sindresorhus.com/webpack-5-headache-b6ac24973bf1
26 Upvotes

14 comments sorted by

8

u/the_real_cryptodira Oct 11 '20 edited Oct 11 '20

The explicit implication of a major version change is that there will be breaking changes, so I don't see why this is such a "headache."

It's not as if Webpack 4 has all of sudden been wiped off of the face of the Earth!

Edit — A couple of delightful quotes from the post:

Webpack created convenience by automatically polyfilling and then now suddenly took it away. If they never had polyfilled, this would not be an issue, but developers now expect packages on npm to just work in the browser after being bundled.

Followed literally 6 sentences later by:

I am not going to add polyfills to my packages. Polyfills add bloat and bugs and I don’t want Node.js users to be inconvenienced by this.

If my eyes were rolling any harder, they'd be a 20 year old at Burning Man.

11

u/sindresorhus Oct 11 '20

You are misunderstanding. Feel free to roll back the eyes. The first quote is talking about polyfilling for front-end, the latter is talking about Node.js. I don't want browser polyfills for Node.js users.

1

u/the_real_cryptodira Oct 11 '20

I stand corrected. That still doesn't mean you need to change your build configuration. The solution to your perceived problem is the easiest of all — do nothing.

You're heaping criticism on a team of very talented people for no reason.

4

u/sindresorhus Oct 11 '20

If a developer decides to stay on Webpack 4, you're right. They don't have to change anything. But I think most will eventually want to upgrade and then they'll have to deal with this.

I'm not criticizing the team. They're doing good work. I'm criticizing one of their decisions. I feel they only considered the benefit for Webpack and not what impact it will have on the users and the ecosystem.

-4

u/DefiantBidet Oct 12 '20

And when you used to spam every js sub when you released a new thing, was that for the benefit of the ecosystem or yourself?

11

u/tony-husk Oct 11 '20

I think this is a positive change in webpack. at the same time, sympathise sympathise with Sindre’s maintenance burden in responding to issues from users who don’t understand.

1

u/Zhouzi Oct 12 '20

To me, what this post says is that webpack users might run into bugs they had not suspected when upgrading to webpack 5. Those bugs might not be so easy to fix. It’s a fair warning.

The post is probably getting controversial because of the way it’s phrased. I am pretty sure Sindresorhus has a lot of respect for the webpack team, perhaps he was a little emotional. I hope the reactions help spreading a reminder of how hard it is to build open source software and how respectful we should be toward each other.

-12

u/burgonies Oct 11 '20

This person sounds like a whiny asshole.

10

u/Ouraios Oct 11 '20

This person is one of the biggest Javascript packages maintainer on Github, so before insulting him try to be in his place to understand why, as a maintainer of hundreds of javascript packages, he feels that webpack 5 can be headache.

I'll give you that, maybe he should have reworded his title to "Why upgrading to webpack 5 as a front-end developer can be an headache as for today" its exactly what his blog post reflect and this is (as for today) definitly a reality.

-3

u/burgonies Oct 11 '20

You can be both “one of the biggest” whatever and end still be a whiny asshole. I’m not arguing against any of their points per se, but that article is all smug pissiness.

2

u/Fit_Sweet457 Oct 12 '20

He's right but I don't like it so I'll call him a whiny asshole

FTFY

0

u/[deleted] Oct 11 '20

[deleted]

0

u/Fit_Sweet457 Oct 12 '20

How is it the package maintainer's responsibility to support browsers? They can choose to support browsers or not, it's their decision.

0

u/[deleted] Oct 12 '20

[deleted]

2

u/Zhouzi Oct 12 '20

I don’t think Sindresorhus is expecting the tools to do that for him. What he’s saying is that the tools used to do that, people got accustomed to it and now it’s gone. So he’s fearing the amount of issues people are going to raise about it, indicating that he’s going to redirect them to the tools’ support.

0

u/[deleted] Oct 12 '20

[deleted]

1

u/Fit_Sweet457 Oct 12 '20

How does that say otherwise? He never had polyfills in his packages and he says he will never add them. Webpack automatically added them in the past and some people relied on it, perhaps even thinking it was part of the package itself. Now Webpack has taken their automatic polyfilling away, which will result in errors for some people. Nobody's saying that Webpack is a bad actor because of that, the complaint is that whatever error pops up will point users to the previously polyfilled package (which hasn't changed) instead of Webpack. So in essence, Webpack removes a convenience features which results lots of irrelevant bug reports for many unrelated packages.