-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
I wanted to migrate my Vue 2 project to Vue 3.
The problem is, that the wrap
-function is still using and expecting the Vue
-instance, which is why i get the following error:
vue-wc-wrapper.js?b803:172 Uncaught TypeError: Vue is not a constructor
The main.js
:
import { createApp } from "vue";
import App from "./App";
import wrap from "@vue/web-component-wrapper";
const app = createApp(App);
const WrappedElement = wrap(app, app);
// Tried several other things
// const WrappedElement = wrap(app, App);
// const WrappedElement = wrap({}, app);
// const WrappedElement = wrap({}, App);
// const WrappedElement = wrap(app);
window.customElements.define("my-name", WrappedElement);
This makes total sense, since global Vue doesn't exist anymore.
Any work around on this?
husayt, do-web, ibrahimabtula, euberdeveloper, saas786 and 6 more
Metadata
Metadata
Assignees
Labels
No labels