ES Modules Are Terrible
gist.github.comES modules are cancer. I'm fine w the syntax — in fact, I love the syntax.
But if you use "module: true" in your package.json, you are splitting the npm ecosystem into two groups, and it's not moving us forward.
and fwiw, my opinion comes from attempting to upgrade packages that I've depended on that all of a sudden add the module: true, which essentially requires that ALL packages must upgrade — which is 99% of the time not possible because all the other deps are usually CJS.
this is also similar to the non-incremental way TS rolled out in the early days, also causing knee-jerk reactions to TypeScript. However over time, devs found ways to incrementally type JS to TS, and so we've all mostly evolved by now.
If ESM could do similar, allowing for incremental evolution, then it would solve all of the problems. I don't see why cjs and esm cannot co-exist
Yes, they are. And a pain in the ass when a dev can't get the package syntax right to import cjs when appropriate, but claim to support both targets. I literally patch hcaptcha locally to be able to build with it.