Skip to content

Commit 5e2c051

Browse files
maecapozzigaearon
authored andcommitted
Update README.md (#3717)
* Update README.md with a note that reminds users to prepend REACT_APP_ to their environment variables. * Based on #865, where Dan Abramov suggests the person who filed the issue create a PR with these changes. * Took the language from [Adding Custom Environment Variables](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-scripts/template#adding-custom-environment-variables)
1 parent ce07e98 commit 5e2c051

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-scripts/template/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ To define permanent environment variables, create a file called `.env` in the ro
944944
```
945945
REACT_APP_SECRET_CODE=abcdef
946946
```
947+
>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid [accidentally exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running.
947948
948949
`.env` files **should be** checked into source control (with the exclusion of `.env*.local`).
949950

0 commit comments

Comments
 (0)