vuejs / language-tools

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

GlobalComponents intellisense not available if data object is not empty #4456

Closed fabio-emmedata closed 2 weeks ago

fabio-emmedata commented 2 weeks ago

Vue - Official extension or vue-tsc version

2.0.8

VSCode version

1.89.1

Vue version

3.4.21

TypeScript version

-

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 4.88 GB / 15.69 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (125.0.2535.92)
    Internet Explorer: 11.0.22621.3527

Steps to reproduce

I noticed that GlobalComponents intellisense from node_modules disappears after adding a new property to the object returned from data function in Options API mode

This is what I see with empty object:

Screenshot 2024-06-10 141151

This is what I see with at least one property:

Screenshot 2024-06-10 141043

I don't know if something is missing in my editor configuration, but it's easy to reproduce. I also tried to remove all setting and extensions, just only Vue, but nothing changed.

Thanks in advance.

Link to minimal reproduction

https://github.com/fabio-emmedata/test-vue-extension

Any additional comments?

This is how I create the linked repo to reproduce the case:

image

fabio-emmedata commented 2 weeks ago

Solved with "vue.server.hybridMode": true