Closed lyricnz closed 3 months ago
I expect more and more modules will have this as a requirement (eg: chai 5.x, chai-as-promised 8.x)
However it looks like making this change would require making all imports to have explicit .js suffix, which is kindof gross.
https://mikebian.co/converting-a-node-project-from-commonjs-to-esm/
eg https://github.com/chaijs/chai-as-promised/issues/301
Why? https://electerious.medium.com/from-commonjs-to-es-modules-how-to-modernize-your-node-js-app-ad8cdd4fb662
Ugly, but forward-looking PR merged.
I expect more and more modules will have this as a requirement (eg: chai 5.x, chai-as-promised 8.x)
However it looks like making this change would require making all imports to have explicit .js suffix, which is kindof gross.
https://mikebian.co/converting-a-node-project-from-commonjs-to-esm/
eg https://github.com/chaijs/chai-as-promised/issues/301