Just interested - what was the reasoning behind the removal of CommonJS support in v4.0.0? #317
Replies: 2 comments
-
ideally, yes, we never would have dropped our commonjs support; nothing in our code depends on one module system or the other, after all. unfortunately, a major update to our testing library broke our ability to dynamically switch between module formats — meaning that we could only test on one module format — and it was unclear if it would be possible to restore it, given the nature of the change. at the same time, we were being forced to drop summarized list of notable issues
since that doesn't preclude us from restoring support if our tooling permits, but given the effort that's likely to entail i doubt it'll happen on either our end or the testing library's end any time soon. in the meantime, i'd encourage you to either stay on |
Beta Was this translation helpful? Give feedback.
-
Thanks very much for your detailed response @zackschuster, much appreciated. Based on your reply I will stay on v3 for now, but I will move the codebase to es module / import syntax when I can, as it looks like this is where it's all going to move to. |
Beta Was this translation helpful? Give feedback.
-
Hey all,
First of all, thank you to everyone that contributes to these awesome opensource modules like emailjs!
I wanted to ask about the latest release. It seems CommonJS support was removed in v4.0.0, whereas v3.8.1 supported both CommonJS and ESModule systems. I'm wondering what was the reasoning behind the decision to remove CommonJS support considering it is (as far as I know) still the default and standard module loading system for NodeJS? Is this the way the ecosystem is heading?
I'm just interested because I maintain a large NodeJS application written in the 2016 era, so it is going to be a lot of work to convert it to use import syntax, plus there doesn't seem to be a nice / non-clunky way to use both require and import in the one file.
Thanks for your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions