Separate `system-first` shims from binary directory

Open
#2,746 3 comments 1 reaction 1 assignee View on GitHub

@liangmiQwQ is already working on this.

Since Sep 19, 2026.

Assessment

This issue has not been assessed yet.

Description

bug enhancement

Currently, when users set node/pm management mode to system-first, Vite+ will still create its shim under the bin_dir, which is put at the front of PATH. And then these shims will search node in the rest of PATH.

This confuses users semantically, as which node shows the path to Vite+ binary but it actually runs the . What's more, it causes infinite recursion problem (#2728).


My proposal is to separate system-first shims from the Vite+'s main bin dir. All binaries should be put in a separate directory named like system-first-bin, which should be put at last of PATH, so users can use their system node/pm first, and fall back to Vite+'s tools if they don't have. (Keep the current behavior)

vp env on / vp env off need to refresh the shims and put them at the right places.

Also, all binaries should use Vite+'s own downloaded version. Logic like finding system node / pnpm can be gone.

This proposal essentially is to re-implement the system-first mode by leveraging operating system capabilities. It can also simplify the architecture, improve the performance and reduce confusion.


Not sure whether this brings breaking change, need to confirm whether to implement before RC (cc @fengmk2)

Dominant language
Rust
Stars
5.8k
Forks
263
Avg merge
22h 44m
Merged PRs (30d)
134

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voidzero-dev/vite-plus

All issues in voidzero-dev/vite-plus

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.