vuejs / vue-web-component-wrapper

(Vue 2 only) Wrap a Vue component as a web component / custom element.
1.05k stars 99 forks source link

Wrap application to web component #88

Open zvitek opened 4 years ago

zvitek commented 4 years ago

Hello, it's possible to wrap all application to web component? I prepare a small widgets witch you can insert to own page. But there is a problem with client styles which can broke my widget. Therefor I would like to wrap the widget to web component and isolate it.

Thank you for a tips

new Vue({
    i18n,
    store:  $store,
    router: initRouter(base, mode),
    render: h => h(Widget)
}).$mount(targetElementName);
luatnd commented 3 years ago

@zvitek Hey did you do that? Is store and router still work?

brunogarciagonzalez commented 2 years ago

Check this out for Vue2, it may work:

https://itnext.io/vuidget-how-to-create-an-embeddable-vue-js-widget-with-vue-custom-element-674bdcb96b97 https://vuidget.danajanoskova.sk/