Title: TS server not reload tsconfig when extended tsconfig is installed · Issue #51351 · microsoft/TypeScript · GitHub
Open Graph Title: TS server not reload tsconfig when extended tsconfig is installed · Issue #51351 · microsoft/TypeScript
X Title: TS server not reload tsconfig when extended tsconfig is installed · Issue #51351 · microsoft/TypeScript
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", } } tsconf...
Open Graph 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": ...
X 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", "c...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/51351
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TS server not reload tsconfig when extended tsconfig is installed","articleBody":"# Bug Report\r\n\r\nMy package's tsconfig extends a shared tsconfig from another npm package.\r\nPackage tsconfig\r\n```json\r\n{\r\n \"extends\": \"some-config-package/config/tsconfig.shared.json\",\r\n \"compilerOptions\": {\r\n \"outDir\": \"./dist\",\r\n \"rootDir\": \"./src\",\r\n }\r\n}\r\n```\r\n\r\n`tsconfig.shared.json` in some-config-package\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"jsx\": \"react-jsx\",\r\n }\r\n}\r\n```\r\n\r\nWith TS server up and running:\r\nWhen 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:\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"outDir\": \"./dist\",\r\n \"rootDir\": \"./src\",\r\n }\r\n}\r\n```\r\n\r\n### 🔎 Search Terms\r\n\r\nTS server, tsconfig\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n* 4.8.4\r\n\r\n### 🙁 Actual behavior\r\n\r\nWhen the extended tsconfig file is installed, TS server will not reload the tsconfig\r\n\r\n### 🙂 Expected behavior\r\n\r\nWhen the extended tsconfig file is installed, TS server should parse the extended tsconfig and reload tsconfig\r\n\r\n### Question for workaround without restarting TS server\r\n\r\nI know restarting TS server solves the issue.\r\nI 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?\r\n","author":{"url":"https://github.com/vaanpan90","@type":"Person","name":"vaanpan90"},"datePublished":"2022-10-30T08:04:51Z","url":"https://github.com/microsoft/TypeScript/issues/51351"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1fd60e5c-2fbc-17c3-d832-bd639b36262f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5E6:34CAB:7CC41A:A06DDC:6B00E8E2 |
| html-safe-nonce | 1d1fe150b411d042b720c3750c1e48320e78f7666132b733a59afa2c8659d651 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUU2OjM0Q0FCOjdDQzQxQTpBMDZEREM6NkIwMEU4RTIiLCJ2aXNpdG9yX2lkIjoiMTQ2Mzk0NDc4MDA3MjQxMzQxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 69d47fd94b9d499bd70311e4d1e0f4d5bff72a0a0fa9f78d4a04a6b05bf73d51 |
| hovercard-subject-tag | issue:1428663276 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/51351/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7765e7152b4b8d8604fe9c7065b2a6c8a915da33173d2477f22183f3382fb7ad/microsoft/TypeScript/issues/51351 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7765e7152b4b8d8604fe9c7065b2a6c8a915da33173d2477f22183f3382fb7ad/microsoft/TypeScript/issues/51351 |
| og:image:alt | 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": ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vaanpan90 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width