Closed
Description
I'm not sure if this is expected, but it doesn't feel right.
If I run an app with
$ REACT_APP_FOO=bar npm start
I can access process.env.REACT_APP_FOO
, but REACT_APP_FOO in process.env
returns false, and process.env["REACT_APP_FOO"]
is undefined
.
I'm trying to have something like:
function getConfig(key) {
if (key in process.env) {
return process.env[key];
}
return defaults[key];
}