vuedx / languagetools

A collection of tools for better IDE experience.

Home Page:https://vuedx.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin "@vuedx/typescript-plugin-vue" added in tsconfig but vue module not found in ts file

tangkunyin opened this issue · comments

I start a project with yarn create @vitejs/app then flow the readme to use Vetur.

  1. Install and add @vuedx/typescript-plugin-vue to the plugins section in tsconfig.json
  2. Delete src/shims-vue.d.ts as it is no longer needed to provide module info to Typescript
  3. Open src/main.ts in VSCode
  4. Open the VSCode command palette
  5. Search and run "Select TypeScript version" -> "Use workspace version"

In the main.ts I got an error when delete src/shims-vue.d.ts

image

In official samples I found nothing about configuration in https://github.com/znck/vue-developer-experience/blob/main/samples/typescript-with-config/src/main.ts

So is it a mistake in readme or am I using the wrong config ?

I tried adding this tsconfig.json but I'm still have the same issue.

"contributes": {
    "typescriptServerPlugins": [
      {
        "name": "@vuedx/typescript-plugin-vue",
        "enableForWorkspaceTypeScriptVersions": true
      }
    ]
  }

It would help if the tsconfig example was in the readme. I can't get this to work so I'm just using shims-vue.d.ts

commented

I have the same problem - is there no documentation showing how to properly use this plugin? shims-vue.d.ts seems to be the only option for now.

Version "^0.6.3" seems ok.

Version "^0.6.3" seems ok.

Doesn't work for me

Fixed by installing the "VueDX" VS Code extension