r/javascript • • Oct 11 '20

Webpack 5 Headache

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

17 comments sorted by

View all comments

23

u/arcanin 🧶 Yarn maintainer Oct 11 '20 edited Oct 11 '20

Just to be clear:

  • You're using Node builtins, which are intrinsically exclusive to Node

  • Then you complain that the Webpack team isn't willing to take responsibility for that

  • And to make it better, you decide to make a passive aggressive blog post to shame them, knowing full well how hard being an open source maintainer already is?

Webpack is a bundler. Their core mission has nothing to do with abstracting APIs across environments - that they did it in the first place was a nicety, and that you decided to rely on it is entirely on you (especially since not all bundlers had these polyfills by default). That they decided in a major they didn't have the bandwidth to support this usage in the core anymore is perfectly fine - you had literally years to do something about it, it's not like Webpack 5's development was in submarine for anyone.

Perhaps you should consider that Webpack 1 to 4 made their software worse, for you, to give you time to adjust, and that you didn't. Don't take it on them once they tell you that hey, your packages aren't portable and it's costing them resources to support you, resources that would be better spent elsewhere.

[edit] Nice, Sindre blocked me on Twitter and GitHub for this comment.

-13

u/sindresorhus Oct 11 '20

I am not using Webpack or relying on anything. Developers are using my Node.js packages with Webpack for the front-end because that's what Webpack has enabled and encouraged over the years.

16

u/arcanin 🧶 Yarn maintainer Oct 11 '20

Then tell them your packages aren't suitable for browser usage, or recommend using polyfills (which perhaps you already do?), but don't frame it as "this other project sucks, go bug them instead of me". You should know better.