3 ms·
Because millions of mature packages and libraries already use CommonJS. If we have to rebuild the JavaScript ecosystem from the ground up we might as well do it
by davidmurdoch 3y ago
Because millions of mature packages and libraries already use CommonJS. If we have to rebuild the JavaScript ecosystem from the ground up we might as well do it in a different language.
- vbezhenar 3y agoI recently built react app and everything worked with ESM. Bump major version and that's about it. If someone need to work with old dependencies, they have it.
- davidmurdoch 3y agoOld?
- TheCoelacanth 3y agoApps are easy. Have you built a library?
- WorldMaker 3y agoIn today's supported Node (works just fine in LTS) just "type": "module" in package.json (and learn "exports" for ESM only), never use anything but ESM, and everything mostly "just works" with no CommonJS in sight within your library (other than maybe .cjs config files for slower build/dev time tools like Jest).