This explanation by sindresorhus is a good overview of the modules issue. He removed the old module system from all of his hundreds of open source libraries in one go. 2 months of my life went to upgrading all of that at work 😅

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Reply to this note

Please Login to reply.

Discussion

And DHH wrote some stuff about the complexity of building JS. Here’s one article I quickly found:

https://world.hey.com/dhh/modern-web-apps-without-javascript-bundling-or-transpiling-a20f2755

Yes, that is a great guide and ESM is a move to the right direction. It still requires you to jump through hoops though, when working with CJS dependencies.

And unfortunately integral parts of the node ecosystem (eg express) still do not publish ESM exports

Thanks guys will check these out!