Respect Vite cache directory for emitted data
Open
@webfansplz is already working on this.
Since Mar 19, 2026.
enhancement
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 89
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 24
Description
Clear and concise description of the problem
When running Vite with devtools enabled, various files are emitted to the node_modules/.rolldown directories. In some setups, e.g. with Yarn PnP, one does not necessarily have a node_modules directory, causing this to be created by this tooling. It would be nice to have a way to control where such assets are emitted.
Suggested solution
Leverage the cacheDir option from Vite as default value instead of node_modules, to allow for easy overriding.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.