Skip to content

Commit bd9f0eb

Browse files
authored
docs: clarify next-env.d.ts regeneration (vercel#94232)
## What? Closes vercel#94153. Clarifies that `next-env.d.ts` is managed by Next.js and that its contents may change over time, including between commands such as `next dev` and `next typegen`. ## Why? Projects that still track `next-env.d.ts` can see command-order diffs when the generated route type imports switch between `.next/dev/types` and `.next/types`. The docs already recommend excluding the file from version control; this makes the generated-file contract and manual-edit guidance explicit. ## Testing - `npx --yes prettier@3.6.2 --check docs/01-app/03-api-reference/05-config/02-typescript.mdx` - `git diff --check`
1 parent 0dc1884 commit bd9f0eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/01-app/03-api-reference/05-config/02-typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Running `next dev`, `next build`, or [`next typegen`](/docs/app/api-reference/cl
8888

8989
> **Good to know**:
9090
>
91-
> - We recommend adding `next-env.d.ts` to your `.gitignore` file.
91+
> - `next-env.d.ts` is managed by Next.js. Its contents are an implementation detail and may change over time. Add it to `.gitignore`. If your project already tracks the file, remove it from Git. Do not edit this file manually.
9292
> - The file must be in your `tsconfig.json` `include` array (`create-next-app` does this automatically).
9393
9494
## Examples

0 commit comments

Comments
 (0)