Post

Is this a trade off for speed of build times with esbuild becoming the default in v19? Or is this offset by people using deferable components and hydration?

Ricky@ricky.pt

Interesting! I'm going to try this lib 👏 Btw, created an empty Angular 19 project this afternoon and compared both build versions: ESBuild was ~20Kb larger than Webpack 🤷

It's just that — the older bundlers are slower, but are better at tree-shaking unused code. The article is still WIP, but the first column represents esbuild and the last one webpack. Depending on the code itself, the difference can be huge.

Filip Sobol@filipsobol.com

*Build time or build size?* I'm writing an article comparing tree-shaking capabilities of bundlers and looking for big JS libraries (100 KB+) I can use for testing. Any suggestions? The differences are big, especially between “old” and “new” bundlers (no names yet, but build time are a good hint)

The difference can be huge, I am currently updating our library to make the code more "resilient" to these differences. The changes involved are so small which is even scarier to be honest as a library author. Definitely need strong tests around this as it can be so easy to regress.

Yes a little of that, but also some cases of removing ... spread operators as that looked to prevent the object being spread from being tree shaken if the target object was not used.

0 reposts0 likes

No replies yet.