JSX for Vue 3
Go to file
2020-07-02 13:30:17 +08:00
packages chore: update vue to 3.0 beta17 2020-07-01 22:01:57 +08:00
scripts chore: deploy site in netlify.app (#12) 2020-06-17 19:57:37 +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: deploy site in netlify.app (#12) 2020-06-17 19:57:37 +08:00
README-zh_CN.md docs: add zh-CN.md 2020-07-02 13:30:17 +08:00
README.md docs: add zh-CN.md 2020-07-02 13:30:17 +08:00
yarn.lock chore: update vue to 3.0 beta17 2020-07-01 22:01:57 +08:00

Babel Plugin JSX for Vue 3.0

To add Vue JSX support.

English | 简体中文

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"]
}

Usage

options

  • transformOn

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

  • compatibleProps

compatible with Vue 2.x

{ props, on = {}, attrs, ...rest } will be transformed to { ...props, ...attrs, ...transformOn(on), ...rest }

Compatibility

This repo is only compatible with:

  • Babel 7+
  • Vue 3+