You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after migrating jest from babel to swc we found that now our unit tests have to specify an __esModule: true when mocking a module that has a default export.
worth a mention that it seems this is only needed when mocking a module that is dynamically imported with import() (statically imported modules are fine)
we previously avoided this with babel config via specifying a noInterop: true on a plugin called babel-plugin-dynamic-import-node
I did try noInterop: true, it did fix this issue but introduced another issue where nothing from node_modules could be imported, links above reproduce that as well
Describe the feature
after migrating jest from babel to swc we found that now our unit tests have to specify an
__esModule: true
when mocking a module that has a default export.example:
worth a mention that it seems this is only needed when mocking a module that is dynamically imported with
import()
(statically imported modules are fine)we previously avoided this with babel config via specifying a
noInterop: true
on a plugin called babel-plugin-dynamic-import-nodehere is the full Babel config
can you please provide an equivalent for swc config
our swc config is
Babel plugin or link to the feature description
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: