JSX for Vue 3
Go to file
Haoqun Jiang 9c464f4ce5
chore: improve setup of the tooling (#4)
* chore: lockfile should be committed to the repo

See https://classic.yarnpkg.com/blog/2016/11/24/lockfiles-for-all/

* chore: explicitly set the npm client to yarn

* chore: set up yarn workspaces

* chore: use jest.config.js

See: https://jestjs.io/docs/en/configuration

Better follow the convention than to define yet another config file name

* test: the `globals` configuration is redundant

* chore: prefer babel.config.js over .babelrc

See https://babeljs.io/docs/en/config-files

* chore: the jsxInjection alias is extraneous

* chore: add .js extension to eslint config

It is the preferred configuration file format.
https://eslint.org/docs/user-guide/configuring#configuration-file-formats

Also deleted the jasmine env as it's not used in this project.

* chore: downgrade to eslint v6 for compatibility with other dependencies

* chore: use eslint-config-airbnb-base instead of the full airbnb config

* chore: remove babel-eslint

Syntax used in this repo can already be parsed with the default ESLint
parser

* chore: add missing peer dependency for `@vue/test-utils`

* chore: enable useWorkspaces in lerna
2020-05-28 21:20:39 +08:00
packages chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +08:00
.eslintrc.js chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +08:00
.gitignore chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +08:00
.npmignore bump 1.0.0-alpha.0 2020-05-24 10:29:41 +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 docs: update README 2020-05-27 13:05:24 +08:00
yarn.lock chore: improve setup of the tooling (#4) 2020-05-28 21:20:39 +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, and you should install @ant-design-vue/babel-helper-vue-transform-on

  • compatibleProps

compatible with Vue 2.x and you should install @ant-design-vue/babel-helper-vue-compatible-props

Compatibility

This repo is only compatible with:

  • Babel 7+
  • Vue 3+