Describe the bug
A vite.config.ts task whose command is vp run <package.json script> 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
{
"name": "repro-package-json",
"private": true,
"scripts": {
"gen": "node -e \"console.log('generated')\""
}
}
vite.config.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
Used Package Manager
pnpm
Logs
Validations
Describe the bug
A
vite.config.tstask whose command isvp run <package.json script>behaves as a pass-through alias:vp run -vsays "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 --filterin a workspace, caches normally.Expected:
Reproduction
see text
Steps to reproduce
package.json{ "name": "repro-package-json", "private": true, "scripts": { "gen": "node -e \"console.log('generated')\"" } }vite.config.tsWhen running:
outer-aliasexecuted both runsouter-directgot "cache hit, 50ms saved" on the second)System Info
Used Package Manager
pnpm
Logs
Validations