@unplugin-vue-ce/v-model
v1.0.0
Published
A vue plugin that extends vue's Custom Element capabilities (v-model)
Downloads
4,178
Maintainers
Readme
@unplugin-vue-ce/v-model
The implementation principle of @unplugin-vue-ce/v-model
comes from vue/core pr #7525
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
Snapshot
Install
npm i @unplugin-vue-ce/v-model
or
yarn add @unplugin-vue-ce/v-model
or
pnpm add @unplugin-vue-ce/v-model
Usage
// vite.config.ts
import { defineConfig } from 'vite'
import { viteVueCEVModel } from '@unplugin-vue-ce/v-model'
import vue from '@vitejs/plugin-vue'
import type { PluginOption } from 'vite'
export default defineConfig({
plugins: [
vue(),
viteVueCEVModel() as PluginOption,
],
})
// rollup.config.js
import { rollupVueCEVModel } from '@unplugin-vue-ce/v-model'
export default {
plugins: [
rollupVueCEVModel(),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('@unplugin-vue-ce/v-model').webpackVueCEVModel(),
],
}
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('@unplugin-vue-ce/v-model').webpackVueCEVModel({}),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildVueCEVModel } from '@unplugin-vue-ce/v-model'
build({
plugins: [esbuildVueCEVModel()],
})