Socket
Socket
Sign inDemoInstall

@unplugin-vue-ce/ce-app

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unplugin-vue-ce/ce-app


Version published
Weekly downloads
940
decreased by-27.58%
Maintainers
1
Weekly downloads
 
Created
Source

@unplugin-vue-ce/ce-app

The implementation principle of @unplugin-vue-ce/ce-app comes from vue-web-component-wrapper

Tips: @unplugin-vue-ce/ce-app Seamlessly integrates with Vue ecosystem plugins such as Vuex, Vue Router, and Vue I18n.

Snapshot

ce-app.gif

Install

npm i @unplugin-vue-ce/ce-app

or

yarn add @unplugin-vue-ce/ce-app

or

pnpm add @unplugin-vue-ce/ce-app

Usage

// main.ts
import { defineCustomElement} from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import Entry from './Entry.vue'
import router from './router'
import { createCEApp } from "@unplugin-vue-ce/ce-app";
const app = createCEApp(App)
// use plugin
app.use(createPinia())
app.use(router)
// provide & inject
app.provide('message', 'hello')
// vue-app is web component name
app.mount('vue-app')

const ceEntry = defineCustomElement(Entry)
customElements.define('ce-entry', ceEntry)

<!-- App.vue -->
<template>
  <ce-entry></ce-entry>
</template>

<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vite App</title>
</head>
<body>
<div id="app">
    <vue-app></vue-app>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

Keywords

FAQs

Package last updated on 27 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc