⚡ Transforms all internal references to a module's exports such that each reference starts with "module.exports" instead of directly referencing an internal name.
When transpiling to ES Modules (including setting "type": "module" in package.json) this breaks Jest tests with the error:
ReferenceError: module is not defined
It seems it doesn't take the targeted build type into account and just assumes it's building CommonJS modules. I know the options are limited and I'm not certain what the best solution is, but since ES Module adoption is only increasing it would be nice to have the option to not produce a broken build with Jest. Just wanted to at least raise the issue for consideration.
Added the plugin to my Babel config. Works great running tests. However running with coverage (with default reporter) everything kind of blows up. Lots of reports of “Container” being falsy attributed to this plugin. Still trying to identify root cause.