Commit 26c1892
authored
feat: add VP_* to DEFAULT_UNTRACKED_ENV (#297)
## Summary
- Add `VP_*` pattern to `DEFAULT_UNTRACKED_ENV` so that Vite+ internal
environment variables (e.g. `VP_HOME`, `VP_VERSION`) are passed through
to child processes without affecting cache keys.
## Context
This is a prerequisite for
[voidzero-dev/vite-plus#1074](voidzero-dev/vite-plus#1074),
which renames all `VITE_PLUS_*` env vars to `VP_*` to avoid leaking
internal vars through Vite's `envPrefix` (default `VITE_`).
After the rename, `VP_*` vars no longer match the `VITE_*` fingerprinted
env pattern set by `vp build`. Without this change, `VP_VERSION` (and
other internal state vars) would be filtered out by
`EnvFingerprints::resolve()` and not reach child processes.
`VP_*` belongs in `untracked_env` (not `fingerprinted_envs`) because
these are internal runtime state variables that should not affect cache
keys.1 parent 88e796f commit 26c1892
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
| |||
0 commit comments