4 ms·
From my experience, the feeling that "Node.js ecosystem is more-or-less completely broken" comes only when you're trying to create package supporting both Commo
by jakubmazanec 3y ago
From my experience, the feeling that "Node.js ecosystem is more-or-less completely broken" comes only when you're trying to create package supporting both CommonJS and ESM (see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c?permalink_comment_id=3850849#gistcomment-3850849 https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3...). Just rip the ban-aid and convert all your code to ESM and you'll be much happier (otherwise you experience something like https://blog.isquaredsoftware.com/2023/08/esm-modernization-lessons/ https://blog.isquaredsoftware.com/2023/08/esm-modernization-...).
- The_Colonel 3y ago"just convert all your code to..." I remember hearing that once from the Python devs...
- jakubmazanec 3y agoI don't use Python, but AFAIK the differences between Python 2 and 3 and the effort needed to upgrade are higher then ESM vs CommonJS. But that's not relevant anyway; I'm not saying the upgrading to ESM-only is easy, I'm saying in the end, it's easier than trying to support both module formats.