This project has been transferred to @vue-macros/jsx-directive 🎉
v-if & v-for directive for jsx.
Thanks @sxzz for the @vue-macros/common
-
v-forTypeScript support
npm i -D unplugin-jsx-vue-directiveVite
// vite.config.ts
import JsxVueDirective from 'unplugin-jsx-vue-directive/vite'
export default defineConfig({
plugins: [JsxVueDirective()],
})Rollup
// rollup.config.js
import JsxVueDirective from 'unplugin-jsx-vue-directive/rollup'
export default {
plugins: [JsxVueDirective()],
}esbuild
// esbuild.config.js
import { build } from 'esbuild'
build({
plugins: [require('unplugin-jsx-vue-directive/esbuild')()],
})Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [require('unplugin-jsx-vue-directive/webpack')()],
}Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [require('unplugin-jsx-vue-directive/webpack')()],
},
}MIT License © 2023-PRESENT zhiyuanzmj