voidzero-dev / voidzero-dev/vite-plus

Inject `PNPM_CONFIG_RUNTIME=false` when `vp env` is `managed`

Offen
#2,468 9 Kommentare 2 Reaktionen 1 zugewiesene Person Beansprucht von @liangmiQwQ Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
5.8k
Forks
262
Ø Merge
1 T. 34 Min.
Gemergte PRs (30 T.)
135

Beschreibung

### Description

`pnpm` itself has a runtime version management system, means the same Node.js version might be downloaded twice by both Vite+ and pnpm.

### Suggested solution

When `vp env` is set to `managed` mode, we can inject `PNPM_CONFIG_RUNTIME=false` in the shell script.

Also, when users call `vp env off` / `vp env on`, Vite+ should also change the status of this env variable.

This can be also shown in `vp env doctor` (Suggested by @ TheAlexLichter)

### Alternative

N / A

### Additional context

Context: https://discord.com/channels/1475973262193459293/1479410337223802951/1538525485166760026

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- [x] Check that there isn't already an issue requesting the same feature.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.