We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1834cb5 commit f3f5599Copy full SHA for f3f5599
packages/react-scripts/config/env.js
@@ -27,9 +27,13 @@ if (!NODE_ENV) {
27
var dotenvFiles = [
28
`${paths.dotenv}.${NODE_ENV}.local`,
29
`${paths.dotenv}.${NODE_ENV}`,
30
- `${paths.dotenv}.local`,
+ // Don't include `.env.local` for `test` environment
31
+ // since normally you expect tests to produce the same
32
+ // results for everyone
33
+ NODE_ENV !== 'test' && `${paths.dotenv}.local`,
34
paths.dotenv,
-];
35
+].filter(Boolean);
36
+
37
// Load environment variables from .env* files. Suppress warnings using silent
38
// if this file is missing. dotenv will never modify any environment variables
39
// that have already been set.
0 commit comments