voidzero-dev / voidzero-dev/vite-plus

Support a dedicated config file for vp run tasks (Turborepo-style turbo.json)

Aperta
#1,494 6 commenti 0 reazioni 1 assegnatario Rivendicata da @wan9chi Vedi su GitHub
pending triage
Lingua principale
Rust
Stelle
5.8k
Fork
262
Merge medio
1g 34m
PR unite (30g)
135

Descrizione

### Description

Currently, vp run task definitions, inputs, and caching behaviour are configured inside `vite.config.ts` under the run key. I'd like to propose first-class support for splitting this out into a dedicated config file — either a JSON file similar to [Turborepo's turbo.json](https://turborepo.dev/docs/reference/package-configurations), or a dedicated vp.config.ts (naming TBD).

I really like Turborepo's DX of having a single, dedicated file that describes the task graph, inputs, outputs, and cache behaviour for the whole repo. A few things make that approach nice to work with:

- Separation of concerns — Vite build/dev config and monorepo task orchestration are conceptually different things. Bundling them into one file means vite.config.ts grows quickly in larger monorepos.
- Discoverability — a dedicated file (vp.json / vp.config.ts) signals "this is how tasks and caching work in this repo" at a glance, without having to scroll past Vite plugin config.
- Tooling friendliness — a JSON variant (with a published schema) would be easy for editors, CI tools, and codegen to reason about, similar to turbo.json or tsconfig.json.
- Mental model — vp is positioned as the unified entry point, so it feels natural for it to have its own config surface rather than always living inside Vite's.

### Suggested solution

_Either (or both) of:_

- vp.json — a JSON config for the run/task layer, schema-backed, suitable for repos that don't need programmatic config.
- vp.config.ts — a TS config using defineConfig from vite-plus, for repos that want types and dynamic logic.

Existing run config inside vite.config.ts could continue to work for backwards compatibility, with the dedicated file taking precedence (or merging) when present.

### 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.