Skip to content

Commit f604188

Browse files
docs: update docs about env file handling (#10710)
### Description Updated documentation regarding `.env` file handling for `build` and `dev` tasks in Next.js and Vite. The previous wording about "file loading order" and "precedence" was simplified to "include the supported .env files" for better clarity and conciseness. Co-authored-by: Cursor Agent <[email protected]>
1 parent a795311 commit f604188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/site/content/docs/crafting-your-repository/using-environment-variables.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Below are examples of proper environment variable configuration for a few popula
241241
The `turbo.json` below expresses:
242242

243243
- The `build` and `dev` tasks will have different hashes for changes to `MY_API_URL` and `MY_API_KEY`.
244-
- The `build` and `dev` tasks use the same [file loading order as Next.js](https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#environment-variable-load-order), with `.env` having the most precedence.
244+
- The `build` and `dev` tasks include the supported .env files for Next.js.
245245
- The `test` task does not use environment variables, so the `env` key is omitted. (Depending on your testing structure, your `test` task may need an `env` key.)
246246

247247
```json title="./turbo.json"
@@ -275,7 +275,7 @@ The `turbo.json` below expresses:
275275
<Accordion title="Vite">
276276
The `turbo.json` below expresses:
277277
- The `build` and `dev` tasks will have different hashes for changes to `MY_API_URL` and `MY_API_KEY`.
278-
- The `build` and `dev` tasks use the same [file loading order as Vite](https://vitejs.dev/guide/env-and-mode#env-files), with `.env` having the most precedence.
278+
- The `build` and `dev` tasks include the supported .env files for Vite.
279279
- The `test` task does not use environment variables, so the `env` key is omitted. (Depending on your testing structure, your `test` task may need an `env` key.)
280280

281281
```json title="./turbo.json"

0 commit comments

Comments
 (0)