Live data from Hacker News

Webpack 5

webpack.js.org

21–30 of 182 posts

Re: Webpack 5

#21
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 with…

I too maintain an old and complex ExtJS 4.1 app and I never dared upgrading the framework. I carry a big zip around and it will be that until the end of its life or when I finally decide to rewrite it using React. For such an old framework it’s surprisingly bug free though.

Re: Webpack 5

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

Configuring the modern JS toolkit (webpack, Babel, your framework of choice, Jest, etc) is such a pain. I’ve been doing front-end for 10+ years. You’re probably not a bozo.

Re: Webpack 5

#23
post #18

The incremental build time improvements look great. Did the cold build times get slower? This tweet shows a benchmark that makes it seem like cold build times got slower in Webpack 5 https://twitter.com/evanwallace/status/1314121407903617025?s...

[deleted]

Re: Webpack 5

#24
post #19
post #5

Earlier quoted context omitted.

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

From that thread:

The benchmark is dominated by terser and SourceMap performance. What you see are different terser configurations. Webpack 4 with compress.passes: 1 and webpack 5 with compress.passes: 2. Enabled SourceMaps makes minimizing extra expensive.

Re: Webpack 5

#25

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?

MacOS's broken-ass filesystem will no longer be allowed to cause warnings on other operating systems, that's a feature I'm keen about!

(removal of the dependency on chokidar and fsevents)

Re: Webpack 5

#26
post #5

Earlier quoted context omitted.

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?

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

Re: Webpack 5

#27
post #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 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 installation looks like, or they'd just check-and-retry on a loop until it succeeded (the easiest hack around such problems)

Re: Webpack 5

#28
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 fit all of our weird edge cases.

2. it has a really solid community of people working on it.

3. it made adopting new features like TypeScript extremely simple for us.

I don't see us upgrading from 4 to 5 eagerly (at least until it's been production-proven), but I'm excited about this release, and I love all the hard work that's gone into it. Congrats to the team — it's no small feat.

Edit: formatting

Re: Webpack 5

#29

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?

The biggest thing I've been excited about is having an offline cache for fast recompilations. It'll make startup times a lot faster, which is a big improvement for developer experence (especially in larger codebases).

Re: Webpack 5

#30
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 frequently have to rerun `npm i` when it fails for seemingly spurious reasons. We used to laugh at Windows years ago, when the solution was so often "turn it off and on again", but it's basically what you need to constantly do with tools like npm and webpack.
Post reply on HN