Description
Bug Report
My package's tsconfig extends a shared tsconfig from another npm package.
Package tsconfig
{
"extends": "some-config-package/config/tsconfig.shared.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
}
}
tsconfig.shared.json
in some-config-package
{
"compilerOptions": {
"jsx": "react-jsx",
}
}
With TS server up and running:
When some-config-package is installed, the TS server does not pick up the extended tsconfig automatically and the tsconfig shown TS server log is still:
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
}
}
🔎 Search Terms
TS server, tsconfig
🕗 Version & Regression Information
- 4.8.4
🙁 Actual behavior
When the extended tsconfig file is installed, TS server will not reload the tsconfig
🙂 Expected behavior
When the extended tsconfig file is installed, TS server should parse the extended tsconfig and reload tsconfig
Question for workaround without restarting TS server
I know restarting TS server solves the issue.
I created a TS server plugin. Is there a way to force TS server to reload tsconfig in plugin? I found this function ts.server.PluginCreateInfo.project.setCompilerOptions
. If I call this function from my plugin to manually set compiler options used for TS server, will it cause some unexpected behavior or inconsistent state for TS server?