-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The current vp run would pass arguments to the children task, but only arguments that was unknown for Vite task.
For example, we have a package.json with the script part below
"cli": "tsx a.ts"vp run cli -a b hello actually run tsx a.ts -a b hello. The same as other package manger (pnpm and nr of @antfu/ni)
However, if we try use pass arguments integrated in Vite+ like --help or -v, they will be treated as arguments to Vite Task but not the task itself.
Like vp run cli -v won't run tsx a.ts -v but show the task details. This is kind of weird.
We should either regard all arguments before -- as vp run's argument (similar npm's behavior), or only read vp's arguments before the command name, like vp run -v cli (@antfu/ni, pnpm, yarn and bun's behavior)
Personally, I would prefer the latter one, it's easier to use and follows the behavior of most of the package mangers. And the former should also be kept in the case of #274
Here is a reproduction repo which shows the current behavior. Thanks.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority