4 ms·
In 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 eve
by WorldMaker 3y ago
In 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).