-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[Vue TS Plugin] The tsconfig selected for root file and external file is inconsistent #57632
Comments
This is working as intended per configuration. When we lookup This can be fixed by plugin by setting Eg i passed this command to server before opening the file and { "seq": 1, "type": "request", "command": "configure", "arguments": { "extraFileExtensions": [{ "extension": ".vue", "isMixedContent": false, "scriptKind": 7 }] }} |
@sheetalkamat Tangentially related question: Putting aside Background: I have seen overlapping includes in many projects over the last years (in parts due to how create-vue sets up projects by default) and it has always seemed a bit non-deterministic to me which tsconfig ends up being used for a given file. |
Thes first encountered tsconfig.json or first of its references will be what tsserver will pick as default configured project for "non ts files" that come from plugin and match through include pattern |
Acknowledgement
Comment
Issues: vuejs/language-tools#3951, vuejs/language-tools#1815
For the root file, tsserver selects the last matching tsconfig in the list of tsconfig references for it.
But for external files, tsserver selects the first matching tsconfig in the list of tsconfig references for it.
Steps to reproduce
apps/web/src/main.ts
, and check the tsconfig at status bar, it'sapps/web/tsconfig.app.json
apps/web/src/App.vue
, and check the tsconfig at status bar, it'sapps/web/tsconfig.vitest.json
, but expected same asapps/web/src/main.ts
The text was updated successfully, but these errors were encountered: