-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Types are not resolved when exported from vue file in monorepo setup #4607
Comments
I also sometimes get on that repo.
|
I don't think tsserver can read directly from
|
I don't want to build my internal packages, huge DX downside. Anyway it does work. I am successfully using this exact setup on 3 different monorepos. When I try to use those exact versions in reproduction it doen't work tho, not sure why. On latest version adding/removing additional files makes it work again, thats why reproducing it for mes was so hard. |
I managed to make it work, somewhat. If you first open source file and then go to file where it is imported types are resolved correctly. However if you first go to target file, types are not. That behavior is present in 2.0.22 version too. Screen.Recording.2024-07-24.at.17.58.17.mov |
Setting "vue.server.hybridMode": "typeScriptPluginOnly" made it work I think. Even after reload types are present. Credit from #4611 |
|
That is very non ergonomic. Vue supports exporting types/variables from components, I would expect Vue language server to support it as well. If this feature not expected to work it should not work at Vue level. Anyway for now it works for us with |
You're right - this should work |
@minht11 May I ask why your
by looking at the |
Using latest version 2.1.6 and things work correctly even without |
@codethief I am using moonrepo to handle things for me. More info https://moonrepo.dev/docs/guides/javascript/typescript-project-refs |
Vue - Official extension or vue-tsc version
v2.0.28
VSCode version
1.91.1
Vue version
3.4.33
TypeScript version
5.5.3
System Info
Steps to reproduce
Screen.Recording.2024-07-23.at.02.31.18.mov
What is expected?
Imported type is unresolved
What is actually happening?
Import type should be resolved.
Link to minimal reproduction
https://github.com/minht11/vue-tsc-monorepo-import
Any additional comments?
This took a lot of time to narrow down. Having additional files made it work/fail. I do not see error when running CLI, but I do see it in my larger project, this is a problem from at least
2.0.22
.The text was updated successfully, but these errors were encountered: