Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js 9 forcibly applies suggested changes to tsconfig.json #8034

Closed
alexharri opened this issue Jul 19, 2019 · 3 comments
Closed

Next.js 9 forcibly applies suggested changes to tsconfig.json #8034

alexharri opened this issue Jul 19, 2019 · 3 comments

Comments

@alexharri
Copy link

When upgrading to Next.js 9 I received this message:

The following changes are being made to your tsconfig.json file:
  - compilerOptions.skipLibCheck to be suggested value: true (this can be changed)
  - compilerOptions.forceConsistentCasingInFileNames to be suggested value: true (this can be changed)
  - compilerOptions.noEmit to be suggested value: true (this can be changed)
  - compilerOptions.esModuleInterop must be true (requirement for babel)
  - compilerOptions.module must be esnext (for dynamic import() support)
  - compilerOptions.resolveJsonModule must be true
  - compilerOptions.isolatedModules must be true (requirement for babel)

It's a bit weird that suggested changes are applied without any prompt. Even required modifications to any config file should not be applied without warning.

Wouldn't it make more sense to show a message letting the user know that these changes need to be made instead of forcibly making them for him? Or at least asking before modifying and creating files.

The user is also not informed at all that the exclude and include options in tsconfig.json are modified.

@Timer
Copy link
Member

Timer commented Jul 21, 2019

@alexharri Next.js 9's integrated TypeScript support is meant to be as helpful and automatic as possible.

Many of the flags applied in this message can be modified -- other are simply requirements that would fail the build otherwise if left omitted.

I'm not sure a prompt is warranted here, because answering "No" would just cancel the issued command and not allow you to start or build your application.

Do note, you may also freely adjust include and exclude! They're just given their default values if unset to provide more clarity into what's really happening with your configuration.

@Timer Timer closed this as completed Jul 21, 2019
@Janpot
Copy link
Contributor

Janpot commented Jul 22, 2019

I'm not sure a prompt is warranted here, because answering "No" would just cancel the issued command and not allow you to start or build your application.

@Timer Stopping the build command might give me the opportunity to make sure my project folder is in a state where I feel confident having tools make automatic changes to my files. Like making sure all my changes are committed and checking out a new branch. Maybe you can add a prompt only when the working dir is not clean?

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants