-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
VSCode complains about *.vue imports across project boundaries when using project references #4750
Comments
Hi, this is a configuration error. If you want to import files in your tests, you must include |
Hint: Check the tsconfig setup when you execute |
Hi David!
I don't think it is. The whole point of project references is to not Moreover, in my experience it is a rather bad idea for tsconfigs to have overlapping includes. The type checker on the CLI and different IDEs will typically no longer agree on which tsconfig to use to type-check a given file, see also my comment here.
This is somewhat of a misconfiguration in create-vue, see this discussion and this PR to fix it. |
I've looked at this again and played with your repo. You're right - there's a difference in behavior between importing vue files and ts files. Edit: Would you kindly update your reproduction repository to only contain the reproduction for this issue? As minimal as possible. We're looking into this. |
Thanks so much, it is highly appreciated!
Will do! |
@davidmatter I have uploaded a minimal reproduction. |
Vue - Official extension or vue-tsc version
Vue extension 2.1.2, vue-tsc 2.1.2
VSCode version
1.90.2 (VSCodium 1.90.2.24171)
Vue version
3.4.34
TypeScript version
5.4.5
System Info
No response
Steps to reproduce
Same steps as in #4711
Minimal reproduction: https://github.com/codethief/tsconfig-playground/tree/0362154d1b9ab1260960016338f77db2a265ea92/2024-07-25-vue-setup-with-project-references
What is expected?
Same expectations as in #4711
What is actually happening?
VSCode / the Vue extension complains about imports from
HelloWorld.vue
inHelloWorld.spec.ts
:Screenshot:
Compared to #4711,
Meanwhile, vue-tsc on the command line works fine.
Link to minimal reproduction
https://github.com/codethief/tsconfig-playground/tree/0362154d1b9ab1260960016338f77db2a265ea92/2024-07-25-vue-setup-with-project-references
Any additional comments?
Overall, this issue sounds very similar to the original #3526 whose fix led to(?) the aforementioned #4711.
The text was updated successfully, but these errors were encountered: