Closed
Milestone
Description
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
Labels
No labels
Activity
gaearon commentedon Sep 21, 2016
A PR sounds good to me, a specific proposal would be easier to discuss.
Thanks!
ayrton commentedon Sep 22, 2016
Opened #695 with a working solution
gaearon commentedon Sep 23, 2016
Fixed in #695, available in 0.5.0.
gaearon commentedon Sep 23, 2016
0.5.0 has been released with this feature.