@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
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
import { rollupVueCEVModel } from '@unplugin-vue-ce/v-model'
export default {
plugins: [
rollupVueCEVModel(),
],
}
Webpack
module.exports = {
plugins: [
require('@unplugin-vue-ce/v-model').webpackVueCEVModel(),
],
}
Vue CLI
module.exports = {
configureWebpack: {
plugins: [
require('@unplugin-vue-ce/v-model').webpackVueCEVModel({}),
],
},
}
ESBuild
import { build } from 'esbuild'
import { esbuildVueCEVModel } from '@unplugin-vue-ce/v-model'
build({
plugins: [esbuildVueCEVModel()],
})