voidzero-dev / voidzero-dev/vite-plus

Task command delegating to `vp run <script>` silently loses task-level caching

オープン
#2,238 コメント 0 件 リアクション 0 件 担当者 1 名 @wan9chi が担当を希望しています GitHub で見る
bug
主要言語
Rust
スター
5.8k
フォーク
262
平均マージ
23時間 18分
マージ済み PR(30日)
139

説明

### Describe the bug

A `vite.config.ts` task whose command is `vp run ` behaves as a pass-through alias:

* It drops the "cached-by-default" behavior
* `vp run -v` says "Cache disabled in task configuration" (the script's uncached default wins)

=> The task executes on every run.

The identical underlying command inlined in the task, or dispatched via `pnpm --filter` in a workspace, caches normally.

Expected:

* Either the config task caches its command like any other (preferred)
* Or the aliasing is documented and warned about

### Reproduction

see text

### Steps to reproduce

### `package.json`

```json
{
"name": "repro-package-json",
"private": true,
"scripts": {
"gen": "node -e \"console.log('generated')\""
}
}
```
### `vite.config.ts`

```ts
export default {
run: {
tasks: {
"outer-alias": { command: "vp run gen" }, // never caches
"outer-direct": { command: "node -e \"console.log('generated')\"" }, // caches
},
},
};
```

When running:
* `outer-alias` executed both runs
* `outer-direct` got "cache hit, 50ms saved" on the second)

### System Info

```shell
vp version 0.2.2
```

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。