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
unable to alias modules using Vitest/Vite #1638
Comments
Haven't tested it, but Try adding |
Hey thanks for advice! Hmm adding it to the inline list I get another error:
I have succeed in loading |
I suspect I have the same issue. Preact alias is not applied when running vitest against a third-party library that itself imports And the error (it is from slightly different source code)
|
@rgripper Code of deps is not runing through Vite pipeline. At the moment we don't have a good solution for this. To fix this, you can use |
Describe the bug
I am replacing my old Jest tests with Vitest (awesome work btw) but I am unable to alias a module in similar manner. Failing to do so the different versions conflict and crash, failing the test. This might be more related to Vite but I succeeded aliasing the same module using just Vite so I'm not sure what's the cause of the problem.
Reproduction
https://github.com/TeemuKoivisto/vite-unable-to-alias-module
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: