Innablr / revolver

AWS Powercycle Facility
MIT License
2 stars 3 forks source link

Update from commonjs to esm project #361

Closed lyricnz closed 3 months ago

lyricnz commented 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

lyricnz commented 3 months ago

Why? https://electerious.medium.com/from-commonjs-to-es-modules-how-to-modernize-your-node-js-app-ad8cdd4fb662

lyricnz commented 3 months ago

Ugly, but forward-looking PR merged.