Skip to content
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

volar doesn't read compilerOptions.types of tsconfig.json #1650

Closed
a1mersnow opened this issue Jul 29, 2022 · 12 comments
Closed

volar doesn't read compilerOptions.types of tsconfig.json #1650

a1mersnow opened this issue Jul 29, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@a1mersnow
Copy link

a1mersnow commented Jul 29, 2022

volar version: v0.39.2
vscode version: 1.69.2

repo: https://github.com/aimergenge/blog

see this file: src/pages/index.vue:2

image

.png module type is in vite/client and tsconfig.json's compilerOptions.types includes it

@shunichio
Copy link

shunichio commented Jul 31, 2022

I have the same problem.

image

image

image

@a1mersnow
Copy link
Author

I have the same problem.

image image image

I found a temp solution:
create a *.d.ts file which use /// <reference types=“vite/client” /> then make sure tsconfig.json includes this file.

@DimplesY
Copy link

I have the same problem.

image image image

I found a temp solution: create a *.d.ts file which use /// <reference types=“vite/client” /> then make sure tsconfig.json includes this file.

This temporary solution is useless for me here

@m-mcardle
Copy link

I also have the same issue. While working on a Nuxt app all of the items in my compilerOptions.types are not being applied to my VueInstance's.

image

image

I was able to resolve this by changing my extension back to an older version (v0.39.1). I've noticed this only broke recently so something must have changed in the past week or so.

@ModyQyW
Copy link

ModyQyW commented Aug 2, 2022

@chivesssss 0.38.9 should work.

@fliebe92
Copy link

fliebe92 commented Aug 2, 2022

v0.39.1 works fine for me, afterwards, it's broken.

@xuanxuan321
Copy link

I have the problem too. i don't use typeScript in my project, but vetur can also read types form tsconfig, i hope volar can also
do it

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Aug 6, 2022
@zhouxiang1991
Copy link

Still not working in v0.39.5

@fliebe92
Copy link

fliebe92 commented Aug 8, 2022

Works fine again in v0.39.5, thanks @johnsoncodehk 😎

@a1mersnow
Copy link
Author

Still not working in v0.39.5

maybe you can reinstall the volar extension

@zhouxiang1991
Copy link

I mean, it doesn't work in workspace mode, but it works in directory mode.

@johnsoncodehk
Copy link
Member

@zhouxiang1991 If still not working in v0.40.13 or later, please open an issue and provide repro case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants