Skip to content

Loading environment variables #687

Closed
@ayrton

Description

@ayrton

Currently Create React App supports environment variables however it leaves some of it to the user's imagination:

Note: Defining environment variables in this manner is temporary for the life of the shell session. Setting permanent environment variables is outside the scope of these docs.

I went on to find my own solution using node-forman but still thought it was sub-optimal*. Is the CRA-team open to leverage dotenv and integrate this in react-scripts (for development)?

Happy to open a PR but wanted to discuss upfront if 👍 or 👎

* I didn't really like wrapping all scripts in a shell script that loads the env variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions