Closed iambumblehead closed 1 day ago
The specific error described at the top of this issue is resolved, however, after updating @swc-node/register
a new issue is encountered,
✖ should mock js when using swc (34.125566ms)
file:///home/bumble/soft/esmock/tests/local/mainUtil.js:2
import babelGeneratedDoubleDefault from 'babelGeneratedDoubleDefault';
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module 'babelGeneratedDoubleDefault' does not provide an export named 'default'
The error needs context to be understood but, essentially, @swc-node/register
encounters an error loading mixed esm/cjs modules.
Slightly difficult to describe the sequence resulting in the error, here is what happens,
The other loaders used in the test suite process the same import tree without error https://github.com/iambumblehead/esmock/tree/attempt-enable-swc-tests/tests
Thank you for reading me
When trying to create an example test with swc and esmock, this error occurs around the types definition file,
Thanks in advance for any advice