Skip to content

[Vuetify] Could not find defaults instance #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amirtbi opened this issue Feb 14, 2023 · 0 comments
Open

[Vuetify] Could not find defaults instance #6

amirtbi opened this issue Feb 14, 2023 · 0 comments

Comments

@amirtbi
Copy link

amirtbi commented Feb 14, 2023

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

`

<script setup> import { VCard, VCardText } from "vuetify/components/VCard"; </script> hello `

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant