Skip to content

[Web Component] Use plugins inside Web Component #9562

@joris-fonck-loreal

Description

@joris-fonck-loreal

Vue version

3.3.4

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-k5r83k

Steps to reproduce

  • Open the console
  • See the error message

What is expected?

Have a way to use plugins (like pinia, vue-router or any other) inside Web Component.

What is actually happening?

getCurrentInstance().appContext.app is null.

System Info

System:
    OS: Windows 10 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
    Memory: 3.79 GB / 15.74 GB
  Binaries:
    Node: 20.0.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.6.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (119.0.2151.44)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vue: ^3.3.4 => 3.3.4

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions