Skip to content

Intellisense does not work for auto-imported components #477

Open
@mareszhar

Description

@mareszhar

Describe the bug

When I hover over an auto-imported component, intellisense does not work. There is no information about the imported component in the modal that opens up:

intellisense not working

After a lot of experimentation, I noticed that this only occurs when the module name in the auto-generated components.d.ts file is @vue/runtime-core.

module runtime-core

If I change the module name from @vue/runtime-core to vue, intellisense works!
intellisense working

The problem is that manually changing the module name is not sustainable. Whenever unplugin-vue-components detects a new component in my components' directory, it updates the components.d.ts file and changes the declared module name back to @vue/runtime-core.

Why does changing the module name restore intellisense support?
Is there any way to configure unplugin-vue-components to name the declared module vue instead of @vue/runtime-core?

I'm really confused by this bug. All help is appreciated.

Thank you for reading! ❤️


PS: I have version 0.39.2 of Vue Language Features (Volar) installed.

Reproduction

https://github.com/mareszhar/demo-imifcaiwuvc-mrfi

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 314.05 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    npm: 8.15.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Firefox Developer Edition: 102.0
    Safari: 15.5

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy