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:
functiongetConfig(key){if(keyinprocess.env){returnprocess.env[key];}returndefaults[key];}
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.envreturns false, andprocess.env["REACT_APP_FOO"]isundefined.I'm trying to have something like: