-
-
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
cacheDir
not honored if deps.optimizer.{mode}.enabled
is true
#6733
Comments
I did notice that the deprecated Seems like it's not checking vite cacheDir here but it should? vitest/packages/vitest/src/node/plugins/utils.ts Lines 44 to 64 in a939779
|
Looks like a bug indeed. PR is welcome! |
Thanks for confirming, just to clarify my understanding: how do these 3 properties relate and resolve exactly?
|
As par the change #5229, the intent is to put things under const finalCacheDir = cache.dir ?? join(cacheDir, "vitest")
// ^^^^^^^^
// this is probably hard-coded as `node_modules/.vite`,
// which is a bug By default Vite has |
Describe the bug
cacheDir
not honored ifdeps.optimizer.{mode}.enabled
is true. vitest will save cache tonode_modules/.vite
as ifcacheDir
is not specified.Reproduction
Run
Edit the config
Create a test
src/App.test.tsx
Run
node_modules/.vite
.test.deps.optimizer.ssr.enabled
tofalse
, and runnpx vitest
again.vite
as expectedSystem Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: