JSX for Vue 3
Go to file
Amour1688 4c34cf1d5d
perf: replace h with createVNode for PatchFlags (#6)
* chore: disable `no-bitwise` in eslint

* feat: replace h with createVNode for PatchFlags

* fix: vModel modifiers shift

* chore: rename v-_model to _model in sugar-v-model

* fix: hasRef will not always be false

* feat: Check if an attribute value is constant

* chore: pass null when children is empty

* chore: describe Transform JSX in test

* chore: add describe Patch Flags

* perf: import compatibleProps when opts.compatibleProps is true

* test: add coverage report (#7)

* refactor: cjs to esModule

Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
2020-06-07 17:22:42 +08:00
packages perf: replace h with createVNode for PatchFlags (#6) 2020-06-07 17:22:42 +08:00
.eslintignore perf: replace h with createVNode for PatchFlags (#6) 2020-06-07 17:22:42 +08:00
.eslintrc.js perf: replace h with createVNode for PatchFlags (#6) 2020-06-07 17:22:42 +08:00
.gitignore perf: replace h with createVNode for PatchFlags (#6) 2020-06-07 17:22:42 +08:00
CHANGELOG.md docs: changelog 2020-05-19 21:44:08 +08:00
lerna.json chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +08:00
LICENSE Initial commit 2020-05-08 16:58:50 +08:00
package.json chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +08:00
README.md doc: update README 2020-06-04 19:45:40 +08:00
yarn.lock perf: replace h with createVNode for PatchFlags (#6) 2020-06-07 17:22:42 +08:00

Babel Plugin JSX for Vue 3.0

To add Vue JSX support.

Installation

Install the plugin with:

npm install @ant-design-vue/babel-plugin-jsx -D

npm install @ant-design-vue/babel-helper-vue-transform-on

Then add the plugin to .babelrc:

{
  "plugins": ["@ant-design-vue/babel-plugin-jsx", { "transformOn": true, "compatibleProps": true }]
}

Usage

options

  • transformOn

transform on: { click: xx } to onClick: xxx

  • compatibleProps

compatible with Vue 2.x

Compatibility

This repo is only compatible with:

  • Babel 7+
  • Vue 3+