fix(schema,vite): respect vite.cacheDir if defined#27628
Conversation
|
|
|
I'd love to see this merged. I could finally get rid of the dirty hacks I'm doing to avoid the same issue. |
|
This seems good to me. Only - I wonder if we could do it automatically. I assume you also have a custom buildDir, right? Maybe we could use a hash of that path to create a folder like Obviously it would still be configurable, but the default value would mean no additional config was required if you already customised your buildDir. I'm thinking of this also with #14607 in mind - I wouldn't want to break your setup again when that is implemented. |
vite.cacheDir if defined
|
Great to see this. An overridable default that works automatically when different build directories exist (using hashes of the build directories) also makes sense to me. |
🔗 Linked issue
#27627
📚 Description
Vite's shared option
cacheDiris not currently supported byvite-builder. This PR allows setting it in Nuxt configviteobject.🤨 Why
I am running instances of
nuxt devsimultaneously in one directory. When they both target the samevite.cacheDirthere are conflicts and unexpected behaviors ensue (mostly, app doesn't load).😌 QA
Modified in Playground to confirm it modified Vite's cache directory.