fix: stop emitting the envFile deprecation warning on Vite 8 - #266
Merged
AlemTuzlak merged 1 commit intoJul 28, 2026
Merged
Conversation
commit: |
The vite-node server passes `envFile: false` to `createServer`, which Vite 8 deprecated in favour of `envDir: false`. Pick the key from the installed Vite major so Vite 8 stops warning while the `>=5` peers keep the old key. Also reformats `packages/react-router-devtools/package.json`, which the release bot rewrote in becd7c9 without the Validation Pipeline running. That left `biome ci` failing on main, so every PR since inherits a red check.
bravo-kernel
force-pushed
the
fix/vite8-envfile-deprecation
branch
from
July 25, 2026 15:17
1d3bd6f to
40a22a2
Compare
Contributor
Author
|
I think the docs build failure is unrelated. |
AlemTuzlak
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The vite-node server passes
envFile: falsetocreateServer. Vite 8 deprecated that option in favour ofenvDir: false, so every Vite 8 consumer sees this on startup:The key is now picked from the installed Vite major:
envDir: falseon 8+,envFile: falsebelow.Why
The warning is emitted from a top-level
createServercall inside the plugin, so no consumer config can reach or suppress it — the fix has to be here.Gated rather than renamed outright because the
vitepeer range is>=5.0.0. I verifiedenvDir: falseis honoured on 7 and 8, but not on 5/6; gating leaves those paths byte-for-byte unchanged.Also included: a red-CI fix
packages/react-router-devtools/package.jsonis reformatted ("files": ["dist"]back onto one line). The release bot rewrote it in becd7c9 and the Validation Pipeline did not run on that commit, sobiome ci .has been failing onmainever since and every PR inherits the red check. Happy to split it out if you would rather land it separately.Verified
Same inline config both ways on Vite 8.1.3:
Identical resolved config, no warning.
biome ci .is clean,test:typespasses,test:libpasses.Note that
test-apps/react-router-v8-vitedoes not reproduce this: inside the workspace the package resolves its ownvite@7.2.2devDependency rather than the app's Vite 8, so the warning only appears in a real consumer install.Changeset included (patch).