sreenaths / vue3-webcomponent-wrapper-demo

Demo app for vue3-webcomponent-wrapper
Apache License 2.0
3 stars 4 forks source link

[Vuetify] Could not find defaults instance #6

Open amirtbi opened 1 year ago

amirtbi commented 1 year ago

The following component, is a Vue component that contains Vuetify components.

`

`

Also, I want use it as a web component as follows:

import { createApp, h } from "vue";

import "./style.css"; import App from "./App.vue";

import wrapper from "vue3-webcomponent-wrapper"; // Vuetify import "vuetify/styles"; import { createVuetify } from "vuetify"; import as components from "vuetify/components"; import as directives from "vuetify/directives";

const vuetify = createVuetify({ components, directives, });

const app = createApp(App); // app.component("my-component", MyComponent);

app.use(vuetify);

import CustomForm from "./components/VButton.vue";

const CustomElement = wrapper(CustomForm, createApp, h); window.customElements.define("my-form", CustomElement); app.mount("#app");

`

but, after building project, the following error appears and nothing will appears on display:

[Vuetify] Could not find defaults instance