Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading environment variables #687

Closed
ayrton opened this issue Sep 20, 2016 · 4 comments
Closed

Loading environment variables #687

ayrton opened this issue Sep 20, 2016 · 4 comments
Milestone

Comments

@ayrton
Copy link
Contributor

ayrton commented Sep 20, 2016

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

@gaearon
Copy link
Contributor

gaearon commented Sep 21, 2016

A PR sounds good to me, a specific proposal would be easier to discuss.
Thanks!

@ayrton
Copy link
Contributor Author

ayrton commented Sep 22, 2016

Opened #695 with a working solution

@gaearon
Copy link
Contributor

gaearon commented Sep 23, 2016

Fixed in #695, available in 0.5.0.

@gaearon gaearon closed this as completed Sep 23, 2016
@gaearon gaearon added this to the 0.5.0 milestone Sep 23, 2016
@gaearon
Copy link
Contributor

gaearon commented Sep 23, 2016

0.5.0 has been released with this feature.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants