Web Dev Explorer • 3 HN points • 28 Apr 24
- Node.js has started to support ECMAScript Modules (ESM) natively with version 22, making it easier to use modern JavaScript modules alongside CommonJS (CJS) modules.
- ESM allows for synchronous and asynchronous loading, but Node.js' support for it is currently experimental and comes with limitations like not supporting top-level 'await'.
- The addition of synchronous loading for ESM in Node.js simplifies interoperability between ESM and CJS, easing the transition to ESM and potentially reducing module size in projects.