Skip to content

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

@gkweb

Description

@gkweb

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, 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

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.

Metadata

Metadata

Assignees

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions