-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safely access environment variables #2737
Conversation
🦋 Changeset detectedLatest commit: ac3b847 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2737 +/- ##
==========================================
+ Coverage 87.47% 87.48% +0.01%
==========================================
Files 211 212 +1
Lines 11906 11916 +10
Branches 1550 1555 +5
==========================================
+ Hits 10415 10425 +10
Misses 1441 1441
Partials 50 50
|
Size Change: +137 B (+0.02%) Total Size: 640 kB
ℹ️ View Unchanged
|
Purpose
Vite throws an error when accessing environment variables on
process
(except forprocess.env.NODE_ENV
which is treated as a special case).I tried to add support for
import.meta.env
as a fallback forprocess.env
, however, Vite replaces it and inlines the environment variables when building Circuit UI. I couldn't find a way to prevent Vite from transforming it.Approach and changes
process
not being defined when accessing custom environment variablesDefinition of done