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 17, 2020
1 parent dd11018 commit 4ea3d9d
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 4ea3d9d

Please sign in to comment.