-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Why is create react app editing my tsconfig.json
?
#6269
Comments
I have same problem that existing tsconfig.json is overwrited by Yes, it is not a bug, but its feature puzzle me.😅 |
Create React App only supports certain TypeScript features. Because of this, the |
There should be an option to opt-out of this auto editing of tsconfig.json |
@JaceHensley if you "opt-out" Create React App wouldn't work. This is not optional. |
Hmm maybe it was just how I was using it but I had added an express server at the root of the directory and the I've since moved the client code to a sub project of the server with different |
Well, there are many problems actually. I was able to make absolute imports work but I had to use this workaround. I understand why would you want to somehow control https://github.com/developer239/node-typescript-react-web/blob/master/tsconfig.paths.json It should be possible to enforce only things that are necessary for running CRA and ignore the rest? 🙂 Btw I would like to know if there are people using CRA and typescript without absolute imports. That has to be terrible. |
@developer239 CRA should always "just" work. If we don't enforce or restrict certain features we will break functionality or have inconsistencies. There was no deliberate choice to disable absolute imports in Typescript because we don't want that feature but because it hasn't been implemented in such a way that it is consistent and will always work. We are currently working on absolute imports for both TypeScript and JavaScript. You can track the progress here: #6116 |
Is this a bug report?
No
Why is create react app editing my
tsconfig.json
Config files like
tsconfig
should be project specific.The text was updated successfully, but these errors were encountered: