Skip to content

Dynamic components do not trigger "Failed to resolve component" warning #9836

@leondeklerk

Description

@leondeklerk

Vue version

3.3.11

Link to minimal reproduction

https://stackblitz.com/edit/vue-dsetmr?file=src%2FApp.vue

Steps to reproduce

  • On load, no content and warnings are shown.
  • Comment out case B (line 6)
  • A [Vue warn]: Failed to resolve component: hello-world warning is shown

What is expected?

A dynamic component that loads a component that is not imported should throw a "Failed to resolve" warning, similar to how a direct use of a component that is not imported does.

What is actually happening?

A dynamic component, referencing a component which is not imported, does not show a "Failed to resolve" warning. If the same component is used directly, but not imported, it does show the warning correctly

System Info

No response

Any additional comments?

In our project, we decided to remove our global components, but some of these global components were used in dynamic components. In our case, we ended up with warnings for all statically used components with missing imports, but no warnings for dynamically used components. This resulted in some parts of our application missing without any indication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🍰 p2-nice-to-havePriority 2: this is not breaking anything but nice to have it addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions