Skip to content

process.env does not expose its keys as expected #795

Description

@jobi

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];}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions