You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on the environment (as set by `NODE_ENV`), Environment Variables are loaded from the following sourcesintop-to-bottom order. In all environments, the existing `env`is not overridden by following sources:
155
+
Environment variables are looked up inthe following places,in order, stopping once the variable is found.
156
156
157
-
`NODE_ENV=production`
158
-
159
-
1. `.env.production.local`
160
-
1. `.env.local`
161
-
1. `.env.production`
162
-
1. `.env`
163
-
164
-
`NODE_ENV=development`
165
-
166
-
1. `.env.development.local`
167
-
1. `.env.local`
168
-
1. `.env.development`
157
+
1. `process.env`
158
+
1. `.env.$(NODE_ENV).local`
159
+
1. `.env.local` (Not checked when `NODE_ENV` is `test`.)
160
+
1. `.env.$(NODE_ENV)`
169
161
1. `.env`
170
162
171
-
`NODE_ENV=test`
172
-
173
-
1. `.env.test.local`
174
-
1. `.env.test`
175
-
1. `.env`
163
+
For example, if`NODE_ENV` is `development` and you define a variable in both `.env.development.local` and `.env`, the value in`.env.development.local` will be used.
176
164
177
-
>**Note:**`.env.local` is not loaded when `NODE_ENV=test`.
165
+
>**Note:**The allowed values for`NODE_ENV` are `production`, `development` and `test`.
0 commit comments