vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.56k stars 373 forks source link

v2.0.22 Type detection failed #4502

Closed AAABingBing closed 15 hours ago

AAABingBing commented 6 days ago

Vue - Official extension or vue-tsc version

2.0.22

VSCode version

1.90.2

Vue version

3.4.21

TypeScript version

5.5.2

System Info

No response

Steps to reproduce

Configure compilerOptions. types: ["element plus/global"] in tsconfig Using Vue - Official v2.0.22 component type detection failed, code snippet not highlighted

Switching to v2.0.21 means everything is normal

Link to minimal reproduction

No response

Any additional comments?

No response

davidmatter commented 15 hours ago

Duplicate: https://github.com/vuejs/language-tools/issues/4501

Workaround: Add @vue/runtime-core as a dependency and add this to your tsconfig.json.

  "vueCompilerOptions": {
    "lib": "@vue/runtime-core",
},