Skip to content

Commit 26c1892

Browse files
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

File tree

1 file changed

+2
-0
lines changed
  • crates/vite_task_graph/src/config

1 file changed

+2
-0
lines changed

crates/vite_task_graph/src/config/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
397397
"COMPOSE_*",
398398
// Playwright specific
399399
"PLAYWRIGHT_*",
400+
// Vite+ internal (not fingerprinted — internal state, not build-affecting)
401+
"VP_*",
400402
// Token patterns
401403
"*_TOKEN",
402404
];

0 commit comments

Comments
 (0)