Giter Site home page Giter Site logo

fi3ework / unplugin-vue-ce Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unplugin/unplugin-vue-ce

0.0 1.0 0.0 2.91 MB

🍒 A vue plugin that extends vue's Custom Element capabilities

License: MIT License

JavaScript 2.29% TypeScript 60.33% CSS 4.19% HTML 1.72% Vue 31.47%

unplugin-vue-ce's Introduction

unplugin-vue-ce

A vue plugin that extends vue's Custom Element capabilities (v-model, child style)

English | 中文

Feature

  • 🧩 It is a function extension of vue
  • 🌈 Compatible with multiple bundled platforms(vite、webpack)
  • ⛰ Support v-model
  • ⚡ Support child style

Tips: ⚠ This plugin will inject the implementation code into the vue runtime, which is what I have to tell you. If you have any problems using it, please submit an issue

Install

npm i unplugin-vue-ce -D

or

yarn add unplugin-vue-ce-D

or

pnpm add unplugin-vue-ce -D

Usage

Tips: You need to enable the customElement option of @vitejs/plugin-vue

Vite
// vite.config.ts
import { defineConfig } from 'vite'
import { viteVueCE } from 'unplugin-vue-ce'
import vue from '@vitejs/plugin-vue'
import type { PluginOption } from 'vite'
export default defineConfig({
  plugins: [
    vue(),
    viteVueCE() as PluginOption,
  ],
})

Rollup
// rollup.config.js
import { rollupVueCE } from '@nplugin-vue-ce'
export default {
  plugins: [
    rollupVueCE(),
  ],
}

Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-vue-ce').webpackVueCE(),
  ],
}

Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-vue-ce').webpackVueCE({}),
    ],
  },
}

ESBuild
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildVueCE } from 'unplugin-vue-ce'

build({
  plugins: [esbuildVueCE()],
})

🎯 Support v-model

view more details @unplugin-vue-ce/v-model

🎃 Support the style of child components

view more details @unplugin-vue-ce/sub-style

🍻 Support using web component as root component

view more details @unplugin-vue-ce/ce-app

🚧 Support switch shadow (TODO)

view more details @unplugin-vue-ce/switch-shadow

Thanks

unplugin-vue-ce's People

Contributors

baiwusanyu-c avatar dependabot[bot] avatar wangxiaoshow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.