-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.mjs causes jest to throw (regression in v1.0.4) #145
Comments
It should be a matter of configuring unbuild to output cjs. Contribution welcome! |
Don't you think this b7fd685#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R5 is the source of the regression? |
No, I did that because there is no cjs file generated at the moment |
I am working on a PR to build both |
@pgarciaegido I actually just found the fix and pushed it 😅 |
Amazing @posva ! Just one little comment, do you think it makes sense to use the
Thanks a lot! 😄 |
Totally! Published a new verison |
Reproduction
A CLI app using Jest and
createRouterMock
in a unit test will throw when upgrading to v1.0.4 with:This is because the main file switched to the
mjs
format, which is great for Vite but not ideal for Jest.Expected behavior
Jest tests should still work
The text was updated successfully, but these errors were encountered: