Skip to content

Exposing and initialising Vuetity as part of the library #285

@sanstream

Description

@sanstream

Hi,

This is not really an issue,but a question. First of all, I am building a UI library with a very similar setup (UI components which are based on Vuetify components under the hood).

During the development I wanted to init Vuetify during this step somehow:

const UIComponents = {
  install (Vue) {
    definedComponents.forEach(component => Vue.component(component.name, component))
  },
}

that way a consuming app only had to do a Vue.use(UIComponents) and Vuetify was automatically installed along with it.

But I could not figure out how.

So I used the same approach you did and initalised Vuetify in the same way you did:

Vue.use(Vuetify)
const vuetify = new Vuetify()
Vue.use(UIComponents)

new Vue({
  vuetify,
  render: h => h(App),
}).$mount('#app')

Did you (in the meantime) find a way to still do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions