Skip to content

Server start always generates new .gitignore & .vscode/settings.json #41966

@NuroDev

Description

@NuroDev

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000
Binaries:
  Node: 16.16.0
  npm: 8.11.0
  Yarn: 1.22.19
  pnpm: 7.13.4
Relevant packages:
  next: 13.0.0
  eslint-config-next: 13.0.0
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

With the release of v13 every time a command / script is run, whether that be dev, build, etc, Next.js will always generate a new .gitignore & .vscode/settings.json file.

Not breaking in anyway but really not needed. Especially when using a monorepo, like Turborepo & I already have these files top level so Next.js is just generating extra files that are not needed.

Expected Behavior

Either not generate them at all (Though I know there is of course a reason to actually provide these files / config to users) or not generate them if it is (somehow) detected to be running inside a monorepo.

Link to reproduction

https://codesandbox.io/s/next-vscode-settings-generation-bug-c9ouvj?file=/package.json

To Reproduce

Create a new Next.js project & run either next dev or next build & it will generate a new .gitignore if one does not already exist or append .vscode to your existing .gitignore & similarly either create or append to .vscode/settings.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions