Skip to content

When defined as a WebComponent, useSlots() and $slots return an empty object #8734

Closed
@mav-rik

Description

@mav-rik

Vue version

3.3.4

Link to minimal reproduction

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

Steps to reproduce

Just run and see the rendered content of useSlots() and $slots props:

vue-wc-issue

What is expected?

Expected WebComponent to act similarly as vue component when accessing useSlots() or $slots.

What is actually happening?

useSlots() and $slots return an empty object when using as WebComponent.

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 16.62 GB / 24.62 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 18.12.1 - /usr/local/bin/node
    npm: 8.19.2 - /usr/local/bin/npm
  npmPackages:
    vue: ^3.3.4 => 3.3.4

Any additional comments?

No response

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