voidzero-dev / voidzero-dev/vite-plus

Plugin `config` hook tasks are silently ignored by `vp run`

Open
#1,211 0 comments 0 reactions 1 assignee Claimed by @kazupon View on GitHub
pending triage
Dominant language
Rust
Stars
5.8k
Forks
262
Avg merge
1d 34m
Merged PRs (30d)
135

Description

### Describe the bug

When a Vite plugin adds `run.tasks` via the `config` hook, `vp run` does not recognize those tasks. Only tasks defined statically in `vite.config.ts` or in `package.json` scripts are visible.

### Reproduction

https://github.com/user/vp-plugin-config-repro

### Steps to reproduce

1. Create the project with the above files
2. Run `pnpm install`
3. Run `vp run` — observe that `build:prod` and `build:dev` are missing from the task list
4. Run `vp run build:prod` — observe `Task "build:prod" not found.`
5. For comparison, add a static `run` field to `vite.config.ts` (without plugin) and confirm `vp run` shows the tasks correctly

### System Info

```shell
vp v0.1.14

Tools:
vite v8.0.2
rolldown v1.0.0-rc.11
vitest v4.1.1
oxfmt v0.42.0
oxlint v1.57.0
oxlint-tsgolint v0.17.3
tsdown v0.21.4

Environment:
Package manager pnpm v10.33.0
Node.js v24.14.1
```

### Used Package Manager

pnpm

### Logs

```shell

```

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Check that there isn't [already an issue](https://github.com/voidzero-dev/vite-plus/issues) for the same bug.
- [x] Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.