Repository navigation
Keep .env.local and VITE_* variables out of the site build - #52
Merged
Merged
Conversation
Signing builds on the signing laptop and the deploy builds again, and the two must match byte for byte. VITE_DEBUG came from the laptop's untracked .env.local and from the server's environment, which matched only by coincidence; a build without it turned on debug logging and matched no signature. vite build now reads no .env file and no VITE_* variable and pins VITE_DEBUG to "false", as the offline build already does. yarn dev still reads .env.local. A clean build and one with hostile .env.local and shell values both reproduce the current signed manifest exactly, so no re-sign is needed.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
nimble-turtle
enabled auto-merge (squash)
November 25, 2026 21:21
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.
The signed build and the deploy's build must match byte for byte, but VITE_DEBUG came from an untracked .env.local on the signing machine and from the server's environment, so they matched only by coincidence.
vite buildnow ignores .env files and VITE_* variables and pins VITE_DEBUG to "false", like the offline build;yarn devstill reads .env.local. Tested with a new vite.config.test.ts, the full suite, typecheck and lint, and by building locally with no .env.local and with hostile .env.local and shell values: both reproduce all 51 files of the current signed manifest, so no re-sign is needed.