I'm trying to use vuetify components inside my custom vue plugin that I have created, but it seems that my plugin rendering before the app "knows" that vuetify exists.
i have tried to use Vue.use(Vuetify) inside my plugin but it didn't works and basically, it dosnt make sense to use it in my plugin since i want that the plugin user(developer) will use vuetify as a global dependency in his app so it can seep down to my plugin
this is my vue html template of the plugin:
<v-content>
<v-container fluid fill-height>
<v-layout justify-center>
<div v-if="videoLoading">
<v-progress-circular v-if="useVuetifyLoader"
:size="size"
:width="width"
:rotate="rotate"
:value="videoLoadingProgress*1.5"
:color="color"
>
Downloading...
{{ `${loadedInMB}/${totalInMb}Mb` }}
</v-progress-circular>
<div v-else>
Downloading...
{{ `${loadedInMB}/${totalInMb}Mb` }}
</div>
</div>
<div v-else>
<div>
<div>foo</div>
</div>
</div>
</v-layout>
</v-container>
</v-content>
and this is my plugin :
import MyPlugin from '../lib/MyPlugin.vue';
import Vuetify from 'vuetify'
const install = function (Vue, config) {
Vue.component("my-plugin", MyPlugin)
}
export { install }
*and i tried also :*
import MyPlugin from '../lib/MyPlugin.vue';
import Vuetify from 'vuetify'
const install = function (Vue, config) {
Vue.use(Vuetify)// <-- did not work
Vue.component("my-plugin", MyPlugin)
}
export { install }
and when I implementing my plugin in other app i'm getting these errors:
Unknown custom element: <v-content> - did you register the component correctly? For recursive components, make sure to provide the "name" option
Unknown custom element: <v-container> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Unknown custom element: <v-layout> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Unknown custom element: <v-progress-circular> - did you register the component correctly? For recursive components, make sure to provide the "name" option.