Open segevfiner opened 7 months ago
The Vue language server no longer controls tsconfig selection, because in 2.0 typescript support is implemented through tsserver + @vue/typescript-plugin, which means that now it is all the behavior of tsserver itself.
Then how can it be that for a vue file I'm getting tsconfig.vitest.json and for a ts file I'm getting tsconfig.app.json? Something must still cause the behavior to be different for this case?
See also https://github.com/vuejs/language-tools/issues/1815
Maybe tsserver behaves differently with external files (the file type of Vue files in tsserver projects), I can't give an exact explanation until I dig deeper. Anyway this is now beyond the control of this codebase.
Please track for https://github.com/microsoft/TypeScript/issues/57632
@sheetalkamat indicated that this is configurable, I will look into this.
VSCode's TS client does not provide a configuration method for extraFileExtensions
, so this is currently not configurable in VSCode for Vue.
Hi - very same issue here 🙋
Here is my example https://github.com/andrewbrennanfr/vue-tsconfig
main.ts
uses tsconfig.main.json
and App.vue
uses tsconfig.app.json
- completely based on the reverse order.
Downgrading & disabling the built in TS features (as was recommended before) solves the issue.
This problem cannot be solved on our side, but 2.0.7 has re-introduced the v1 language server, you can upgrade and make sure not to enable Hybird Mode to get consistent behavior with v1.
@johnsoncodehk This is still an issue... Can we request the needed API in VS Code so this can be properly solved?
I am currently unable to find time to investigate it, but let's keep this issue open in case it sinks.
With this now removed, I'm getting the wrong tsconfig.json selected in my Vue projects. By having
tsconfig.app.json
last and enabling this setting, both the TypeScript server and Volar in Vue files pickedtsconfig.app.json
, now Volar picks uptsconfig.vitest.json
instead (Based on thecreate-vue
template). Please restore this setting or make it the default to match TypeScript server behavior.