vue-create-shadow-app
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

vue-create-shadow-app

mount vue(3.x) App in shadowDom

when to use

Vue 3.5 has good support build vue in CustomElement mode, which is base on shadow dom. While if you dont want use the isolation ability without using custom element (eg. custom element is unavailable in chrome extension sandbox environment), try this library.

How to use

It acts just like createApp in vue

And the 3rd parameter allows you to ship global styles like vue.defineCustomElement.

import { createShadowApp } from 'vue-create-shadow-app'

const app = createShadowApp(
  App,
  {
    someProp: 'someValue',
  },
  {
    styles: [elementStyle, ...App.styles],
  },
)
app.use(ElementPlus)

/vue-create-shadow-app/

    Package Sidebar

    Install

    npm i vue-create-shadow-app

    Weekly Downloads

    3

    Version

    0.1.2

    License

    none

    Unpacked Size

    6.36 kB

    Total Files

    7

    Last publish

    Collaborators

    • depressedx