Closed piranna closed 3 years ago
Specifically it gives me
ReferenceError: exports is not defined
when I run it viaNODE_OPTIONS=--experimental-vm-modules npx jest
I also use that flag... Maybe you copied wrong the code? Have you tried to use the resolver as a devDependency? So far it works for me in all the projects I've checked it, there's only one that gives me an error about not able to resolve @testing-library/react/package.json
but I suspect it's a monorepo, and in any case since I'm not using React it continue and the tests are still passing...
Thanks for the PR, merged and published. I've also added you as a collaborator, so it's easier for you to fix things :)
I've also added you as a collaborator, so it's easier for you to fix things :)
Thank you, because I've found another corner case where it doesn't work if package.json
don't have a main
nor exports
has a package-level export.
I've also added you as a collaborator, so it's easier for you to fix things :)
Can you add me permissions to publish on npm
? I've fixed the corner case.
Sure, whats you npm user name?
piranna
done
thank you :-)
I just copied this code into a custom resolver & it resolves the packages!
But then Jest seems to crash on the module syntax within the packages' files.
Specifically it gives me
ReferenceError: exports is not defined
when I run it viaNODE_OPTIONS=--experimental-vm-modules npx jest
Tested with several packages in node_modules, some of which use only
and one which uses
and one which uses