Skip to content

Commit 952bc3e

Browse files
AJamesPhillipsgaearon
authored andcommitted
Correct docs on which .env.* files are supported. (facebook#2247)
* Correct which .env. files are referenced in docs * Highlight this is not available until 1.0.0 * Formatting * Update README.md * Update README.md
1 parent 6937f30 commit 952bc3e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

template/README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -794,20 +794,20 @@ REACT_APP_SECRET_CODE=abcdef
794794

795795
`.env` files **should be** checked into source control (with the exclusion of `.env*.local`).
796796

797-
What other `.env` files are can be used?
797+
#### What other `.env` files are can be used?
798798

799-
>Note: this feature is available with `[email protected]` and higher.
799+
>Note: this feature is **available with `[email protected]` and higher**.
800800
801-
* `.env` - Default
802-
* `.env.development`, `.env.test`, `.env.production` - Environment-specific settings.
803-
* `.env.local` - Local overrides. This file is loaded for all environments except test.
804-
* `.env.development.local`, `.env.test.local`, `.env.production.local` - Local overrides of environment-specific settings.
801+
* `.env`: Default.
802+
* `.env.local`: Local overrides. **This file is loaded for all environments except test.**
803+
* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings.
804+
* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings.
805805

806-
File priority, from left to right:
806+
Files on the left have more priority than files on the right:
807807

808-
* npm test - `.env.test.local`, `env.test`, `.env.local`, `.env`
809-
* npm run build - `.env.production.local`, `env.production`, `.env.local`, `.env`
810-
* npm start - `.env.development.local`, `env.development`, `.env.local`, `.env`
808+
* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env`
809+
* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env`
810+
* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing)
811811

812812
These variables will act as the defaults if the machine does not explicitly set them.<br>
813813
Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details.

0 commit comments

Comments
 (0)