-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Vite's config setting resolve.conditions
isn't respected when recursing through dependencies.
#1588
Comments
Vitest also doesn't respect Vite's default |
Use |
This is nog a bug, Vitest processes files with SSR flag, which mean The other reason we shouldn't use |
Ok, that's a decent reason to have different defaults, but it's not actually a response to this bug. If you look at the MRE I made, the "shallow" import DOES respect |
We respect If there is a way to provide condition to Node directly, we could add it. |
Describe the bug
When
vitest
is recursing through the dependencies innode_modules
it loses track of theresolve.conditions
setting, meaning that nested imports with conditional exports resolve to the wrong file.Reproduction
https://github.com/thislooksfun/vitest-mre
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: