Skip to content

Commit 95b2601

Browse files
authored
Tweak section on expanding env variables
1 parent 12d0544 commit 95b2601

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/react-scripts/template/README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -980,17 +980,20 @@ these defined as well. Consult their documentation how to do this. For example,
980980

981981
#### Expanding Environment Variables In `.env`
982982

983-
>Note: this feature is available with `react-scripts@1.0.18` and higher.
983+
>Note: this feature is available with `react-scripts@1.1.0` and higher.
984984
985-
Expand variables already on your machine for use in your .env file (using [dotenv-expand](https://github.com/motdotla/dotenv-expand)). See [#2223](https://github.com/facebookincubator/create-react-app/issues/2223).
985+
Expand variables already on your machine for use in your `.env` file (using [dotenv-expand](https://github.com/motdotla/dotenv-expand)).
986986

987987
For example, to get the environment variable `npm_package_version`:
988+
988989
```
989990
REACT_APP_VERSION=$npm_package_version
990991
# also works:
991992
# REACT_APP_VERSION=${npm_package_version}
992993
```
994+
993995
Or expand variables local to the current `.env` file:
996+
994997
```
995998
DOMAIN=www.example.com
996999
REACT_APP_FOO=$DOMAIN/foo

0 commit comments

Comments
 (0)