@unplugin-vue-ce/v-model
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.21 • Public • Published

@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

vm.gif

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
// 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
// rollup.config.js
import { rollupVueCEVModel } from '@unplugin-vue-ce/v-model'
export default {
  plugins: [
    rollupVueCEVModel(),
  ],
}

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

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

ESBuild
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildVueCEVModel } from '@unplugin-vue-ce/v-model'

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

Package Sidebar

Install

npm i @unplugin-vue-ce/v-model

Weekly Downloads

665

Version

1.0.0-beta.21

License

MIT

Unpacked Size

19.4 kB

Total Files

6

Last publish

Collaborators

  • baiwusanyu