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

vue-tsc behaves inconsistently with tsc in monorepo #1262

Closed
lovetingyuan opened this issue May 5, 2022 · 3 comments
Closed

vue-tsc behaves inconsistently with tsc in monorepo #1262

lovetingyuan opened this issue May 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@lovetingyuan
Copy link

I have a monorepo, I install vite in the root position instead under the vue project, while vite/client defined in "types" is not applied to .vue files, it can not recognize ImportMetaEnv defined in vite/client, but .ts files work well.

There is the reporduce repo: https://github.com/lovetingyuan/vue-tsc-vite-client-error

@lovetingyuan
Copy link
Author

vue-tsc --noEmit works well, no error.

@lovetingyuan
Copy link
Author

1651731692(1)

@johnsoncodehk johnsoncodehk added the bug Something isn't working label May 5, 2022
@johnsoncodehk
Copy link
Member

johnsoncodehk commented May 5, 2022

It's seems a module resolution issue of volar, you could add import 'vite/client'; to apps/vue2-project/env.d.ts to avoid this problem for now.

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

2 participants