My codebase contains two typescript projects:
- for a react web app
- for web workers
The web worker codebase is part of my public/
folder. Which means that there are two typescript projects in the same workspace. How can I make this work with vs-code ?
So far my question is basically a duplicate of: How to use multiple tsconfig files in vs-code?
The accepted answer explains how to set up a basic configuration and then extend it:
//tsconfig.worker.json:
{
"extends": "./tsconfig.json",
"exclude": [
"src/app"
]
}
But this doesn't work in my case. For the worker.ts
I need a different lib
configuration than for the react app.
It is possible to override that configuration in my tsconfig.worker.json
and to compile with the new settings. But for autocompletion and error highlighting, vs-code only uses the tsconfig.json
, which is not compatible with the webworker source code.