vite-plugin-import-wc
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

vite-plugin-import-wc

Vite plugin for importing vue component as web component

Why?

  • Uses async import
  • Auto registers with provided name

Usage

import getApp from './App?ce'

function init() {
  // Only the first getApp() call registers the component with the given name
  const app = await getApp('my-custom-app')
  document.body.appendChild(app)
}

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-import-wc

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.46 kB

Total Files

12

Last publish

Collaborators

  • dapotatoman