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
- When the entire value is a single placeholder, typed forms produce native values (number/boolean).
166
+
- When used inside larger strings (e.g. `"http://%env(API_HOST)%/v1"`), placeholders are interpolated as text.
164
167
- **TypeScript configs**: call `env("DB_HOST")`; the helper is available globally when the module is evaluated
165
168
- For tighter autocomplete you can build a project-local accessor via `createEnvAccessor(["DB_HOST", "DB_PORT"] as const)`
166
169
@@ -171,9 +174,9 @@ The `env()` helper throws when the variable is missing. Provide a default with `
171
174
`loadConfig` automatically understands `.env` files when the `env` option is provided. The resolver honours the following precedence, mirroring Symfony's Dotenv component:
172
175
173
176
1. `.env` (or `.env.dist` when `.env` is missing)
174
-
2. `.env.local` (skipped when `APP_ENV === "test"`)
175
-
3. `.env.<APP_ENV>`
176
-
4. `.env.<APP_ENV>.local`
177
+
2. `.env.local` (skipped when `NODE_ENV === "test"`)
178
+
3. `.env.<NODE_ENV>`
179
+
4. `.env.<NODE_ENV>.local`
177
180
178
181
Local files always win over base files. The loaded keys are registered on the shared `env` accessor so they show up in editor autocomplete once your editor reloads types.
0 commit comments