Skip to content

Commit

Permalink
Update dotenv files loading order to match CRA v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnito committed Nov 3, 2020
1 parent b8a9cc4 commit 3a0c0f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ if (!NODE_ENV) {
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
var dotenvFiles = [
`.env.${NODE_ENV}.local`,
`.env.${NODE_ENV}`,
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV !== 'test' && `env.local`,
NODE_ENV !== 'test' && `.env.local`,
`.env.${NODE_ENV}`,
'.env',
].filter(Boolean);

Expand Down

0 comments on commit 3a0c0f0

Please sign in to comment.