| Not sure it the author tried a new build tool like vite, esbuild and so on. Working on large projects and having everything first loaded and then you can load it in the browser is a waste of time that every web developer has every day. Some real world times FOR DEVELOPMENT:
Storybook first load: 90 sec,
Storybook after first load changes: 3 sec,
Vue App first load: 63 sec,
Vue app change after that: 5 sec,
Vue App with Vite first load: 1sec,
Vue App with Vite after that: the time it takes me to press command+tab to switch to the browser Do we really have people that use unminfied unbundled esm in production? If Yes, please comment why? I would also ask the author what about cyclic dependencies? ES Modules resolve them automatically. Something which in large code bases can happen. Why do we still put it through babel? Because most of us don't have the luxury of not supporting old browser...
https://caniuse.com/?search=modules
Even if the not supported browsers for our company is 1% it is still a big chunk of money in the end. and this example:
```
app.use("/users", require("./routers/users"));
``` Really? this is "good code" having a require in the middle of a file? Also funny: The author is annoyed that rollup did not support tree shaking in commonjs and then complains that people are wasting time on esm. Maybe the rollup team does not want to waste time on commonjs? Also then he points to a package which did not got any update in 3 years and would make the hole process he complains is to complex even more complex by introducing a new dependencies. Sorry but the more I read that thing the more it sounds to me like a Junior Dev that does not want to learn new things and just likes to rant about things. |
If you are having very slow build times with your existing toolchain, the problem isn't the bundling, which is an extremely fast operation. It's almost certainly going to be one specific computationally-intensive plugin that you either don't need, or would also need if using ESM.