GeezerVison is showing github.com — Accept arguments before command name (e.g. `vp -r run`) · Issue #2983 · voidzero-dev/vite-plus
Accept arguments before command name (e.g. vp -r run) #2983DescriptionDescription
I keep accidentally running vp --filter backend run dev, but viteplus refuses to accept --filter before run. pnpm is fine with this ordering of arguments.
Suggested solution
Accept --filter and other args before the specific command to run, instead of only after.
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.
Activitynaokihaba commented on Nov 18, 2026 @developerzeke
Thanks for the suggestion.
In pnpm, --filter is a global option that works with every command. In Vite+, though, it's only supported by vp run and package management commands like vp add and vp install. Since commands like vp build and vp test don't support it, something like vp --filter backend build doesn't really make sense.
Vite+ already shows an error when it runs into an unknown argument. Maybe we could update that message to point out the right order whenever --filter or -r is placed before the command?
error: unexpected argument '--filter'
hint: try running 'vp run --filter backend dev' instead
That way, anyone who gets the order mixed up can see how to fix it right away. developerzeke commented on Nov 18, 2026 Sure, or being able to just hit y to run it like you can with a typo'd command could be nice. naokihaba commented on Nov 18, 2026 I will work on this soon. Reacted by Developer Zeke Reacted by MK (fengmk2) added a commit that references this issue on Nov 21, 2026This issue will close once commit e98aaa0 is merged into the 'main' branch.e98aaa0 naokihaba commented on Nov 21, 2026 Thanks again for the suggestion, @developerzeke! 🙌
#3500 adds the hint I mentioned above. It'll ship in the next release, so give it a try once it's out! Reacted by Developer Zeke
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|