-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: apply Vite resolving algorithm to node_modules libraries #1673
fix: apply Vite resolving algorithm to node_modules libraries #1673
Conversation
121bce4
to
77d5c4b
Compare
Can we have a flag to toggle this behavior? |
How would you call it? I personally don't think it should be toggable. From my experience with Vitest issues for the past several months, is that people expect aliasing to work as it works in Jest (also inside |
Ok, we could try and see how it works |
After upgrading to
It seems to be caused by |
Please, open a separate issue with minimal reproduction. Thank you! 😄 |
This change breaks projects using yarn pnp 0.19.1 works, when upgrading to 0.20 I get
|
Looks like its already reported #1758 |
This PR adds experimental loader and conditions, so native Node resolving algorithm knows about Vite's resolving algorithm.
This is a giant breaking change, but still should not affect a lot of people. This fixes issues when people applied custom conditions and they were working in Vite, but didn't work in Vitest, because it was imported from another library. This PR also allows applying
alias
to external libraries - this is useful forpreact
, for example.We still don't allow mocking external libraries within another external library!
Closes #1638