Hacker News new | ask | show | jobs
by jhp123 1089 days ago
the benefits of esm are not compelling enough to rewrite everything. Browser-native module loading is a niche use case which can never be as performant as bundling (even if per-request overhead is minimized in http2, a chain of dependencies will lead to excess round trips).
3 comments

Bundling works better with ES6 modules. Compare the experience of using, say, browserify to rollup/esbuild. Plus, with ES6 modules, you can do bundling for your release builds, and do your development work directly with the original source files.
> the benefits of esm are not compelling enough to rewrite everything.

It's rare that standards don't beat out non-standards in adoption.

ESM is the standard; there is only one way this ends,and it's not in favour of CJS.

> the benefits of esm are not compelling enough to rewrite everything.

Your "everything" somehow doesn't account for stuff that wasn't written in NodeJS's standards-incompatible way to begin with.