-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
process.env does not expose its keys as expected #795
Comments
If it's not there it will be undefined, your could write it like this.
|
I think this might be possible to fix if we use new DefinePlugin({
'process.env': {
NODE_ENV: ...,
OTHER_VAR: ...,
// ...
}
}) form instead of new DefinePlugin({
'process.env.NODE_ENV': ...,
'process.env.OTHER_VAR': ...,
// ...
}) like we do now. Would you like to give it a try and maybe submit a PR? The relevant code is in The contributing instructions are here. |
Hey @gaearon I can do this. |
Please check the PR above. I hope it is what you explained |
Fixed in #807. |
This is amazing to find already merged! I've been working on a solution for the env vars issue on the Heroku buildpack. The ability to enumerate |
This is going to be included in 0.7.0, which will be out soon. |
I'm not sure if this is expected, but it doesn't feel right.
If I run an app with
I can access
process.env.REACT_APP_FOO
, butREACT_APP_FOO in process.env
returns false, andprocess.env["REACT_APP_FOO"]
isundefined
.I'm trying to have something like:
The text was updated successfully, but these errors were encountered: