voidzero-dev / voidzero-dev/vite-plus

Custom cache dir handling

Offen
#2,298 0 Kommentare 2 Reaktionen 2 zugewiesene Personen Beansprucht von @wan9chi Auf GitHub ansehen
pending triage
Vorherrschende Sprache
Rust
Sterne
5.8k
Forks
262
Ø Merge
1 T. 34 Min.
Gemergte PRs (30 T.)
135

Beschreibung

### Description

Right now there is no documented way to set a custom cache dir for the Vite+ cache folder. The undocumented version is via an env variable.

At the same time, Vite itself has a `cachedDir` option that could be used (or mistaken by users as the desired option)

### Suggested solution

1. Add a dedicated `run.cacheDir` option
2. If it is not set, use `/task-cache` (Vite's option)
3. If that isn't set either, use the default `node_modules/.vite/task-cache` dir

To make it performant, this probably needs changes in Vite Task itself

### Alternative

_No response_

### Additional context

_No response_

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- [x] Check that there isn't already an issue requesting the same feature.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.