Skip to content
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

Exposing and initialising Vuetity as part of the library #285

Open
sanstream opened this issue Jul 20, 2021 · 0 comments
Open

Exposing and initialising Vuetity as part of the library #285

sanstream opened this issue Jul 20, 2021 · 0 comments

Comments

@sanstream
Copy link

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?

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