-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
tsconfig.json overwitten by react-scripts test
#10911
Comments
same question |
same question here :( |
It's not only the test script, |
A Good test case is to use something from the
Now try to write this in your test:
You will result in this error:
It works in non test, but in test it fails as above. Similar to node modules, test files that are just |
I was able to solve this using a Install the json lib on your project.
then on your {
"scripts": {
...
"posttest": "json -I -f tsconfig.json -e 'this.compilerOptions.noEmit=false'"
...
}
} This script will override the noEmit value after the test script finish |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Describe the bug
First of all, I've installed theese modules:
I wanted to write module import code like this
So, I add this code to compilerOptions of tsconfig.json
And I found out that the path alias is working fine.
Then, When I closed and reopen the VSCode, (which triggers react-scripts test, I think)
the
path
option of tsconfig.json is removed.Did you try recovering your dependencies?
I'v already reinstalled my modules several times.
Which terms did you search for in User Guide?
I couldn't find anyting but this #10178
which is similar issue to me.
Environment
Steps to reproduce
(Write your steps here:)
npx create-react-app cra-test --template typescript
Expected behavior
nothing should happen
Actual behavior
paths
option is deleted in tsconfig.jsonThe text was updated successfully, but these errors were encountered: