dherman/defense-of-dot-js

Why is it requirement for both require and import to load both kinds of modules?

Opened this issue · 0 comments

If require loads CJS and import loads ESM don't things "just work"?

The only thing I can think of off the top of my head is if a library updates to ESM and you were previously loading it using require you need to start loading using import. But that's just a major semver breaking change like any other major semver breaking change. You go look at the docs, see what changed, update your code, move on.

Are there other reasons that this solution was rejected?