Reputation: 1068
I have just created a new Vite + Vue3 project using npm init vue@latest.
On loading the project in VSCode, I get the following error in Main.ts, when importing App.vue:
Cannot find module './App.vue' or its corresponding type declarations
The app seems to work fine, so I assume this is an issue with my VSCode config. Does anyone know how to resolve this?
Upvotes: 11
Views: 5888
Reputation: 1068
I resolved this by enabling Volar's takeover mode, a more performant alternative to the older extension option. Follow these steps:
Upvotes: 12