You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the environment variables, I am using are missing in a .env* file
When I parcel build
Then the build should fail and suggest that the env var is missing
This would make it much safer to build the application as it would fail at the build-time rather than when it has already been deployed.
🤔 Expected Behavior
When the JS code refers to the env variables using process.env.FOO, it should fail when such a variable is not set.
😯 Current Behavior
When the JS code refers to the env variables using process.env.FOO, it gets replaced with void 0 (undefined) and succeeds the build.
💁 Possible Solution
always fail when the environment variable is missing
need to consider if backwards compatibility is important
potentially allow to opt-in/out of this behaviour
🔦 Context
I built and deployed the application without realising that the env vars were missing.
The text was updated successfully, but these errors were encountered:
🙋 feature request
Given the environment variables, I am using are missing in a
.env*
fileWhen I
parcel build
Then the build should fail and suggest that the env var is missing
This would make it much safer to build the application as it would fail at the build-time rather than when it has already been deployed.
🤔 Expected Behavior
When the JS code refers to the env variables using
process.env.FOO
, it should fail when such a variable is not set.😯 Current Behavior
When the JS code refers to the env variables using
process.env.FOO
, it gets replaced withvoid 0
(undefined
) and succeeds the build.💁 Possible Solution
🔦 Context
I built and deployed the application without realising that the env vars were missing.
The text was updated successfully, but these errors were encountered: