-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.
Description
What version of Next.js are you using?
11.0.1
What version of Node.js are you using?
14.7.0
What operating system are you using?
Windows 10 (21390.1)
How are you running your application?
next build && next start
Describe the Bug
The content of next-env.d.ts is being replaced by the following code each time I run next build or simply next:
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />Expected Behavior
Changes in next-env.d.ts should be respected. Quoting docs (emphasis mine):
A file named
next-env.d.tswill be created in the root of your project. This file ensures Next.js types are picked up by the TypeScript compiler. You cannot remove it, however, you can edit it (but you don't need to).
To Reproduce
yarn create next-app --ts test-app
cd test-app
echo "// just a comment to show" >> next-env.d.ts
cat next-env.d.ts
yarn build
cat next-env.d.tshughrawlinson, sebascomeau, vgrafe, rhadamez and Murkantilism
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.