Virtual script not found, may missing script lang=”ts” “allowJs”: true jsconfig.json.

Just in case, for anyone who use Volar in VS Code, just run command Ctrl/Cmd+Shift+P type Volar > Reload Project and the warning will go away.

The more correct way (even if you are not using typescript), as others pointed out is to create jsconfig.json file in your project’s root folder:

{
   "compilerOptions": {
     "allowJs": true
   }
}

发表评论