Skip to content

Expose env vars both with and without the REACT_APP_ prefix #8758

Description

@andreas-karlsson

Is your proposal related to a problem?

A third party library I'm using leverages a certain env variable, say XYZ. Currently there's no way for me to supply that.

Describe the solution you'd like

I realize it's a good safety measure for CRA to only pick up env vars with the prefix, and I don't object to that. However CRA could populate process.env with both keys i.e. both REACT_APP_XYZ and XYZ. That wouldn't violate the safety in any way, but still allows for code to expect any named env var.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions