News for hackers. Stuff that matters.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by dfabulich on Thursday August 06, 2020 @01:16AM (#24068307)
> the last 2 LTS releases of Node

(Author here.)

Node 14 supports ESM, but Node 12 only supports ESM behind the --experimental-modules flag, and its error handling for incorrectly importing CJS is not good.

In 2020, I think it's a bit early to go ESM only, especially since it's straightforward for CJS libraries to support both CJS and ESM clients. (I document how to do this in the article.)

Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by colinr on Thursday August 06, 2020 @02:33AM (#24068620)
The experimental flag was recently removed in v12.17.0 (though the release notes still say ESM is an experimental feature)

https://github.com/nodejs/node/releases/tag/v12.17.0