babel-plugin-vue3-jsx-transform

This plugin transforms Vue3.0 JSX expression

Usage no npm install needed!

<script type="module">
  import babelPluginVue3JsxTransform from 'https://cdn.skypack.dev/babel-plugin-vue3-jsx-transform';
</script>

README

Introduction

This is a babel plugin that helps transform jsx element to vnode for vue 3.0

Details

slot support

<template slot="name">
    ...
</template>

v-show support

<div v-show="name">
    ...
</div>

or

<div vShow="name">
    ...
</div>

v-if support

<div v-if="name">
    ...
</div>

or

<div vIf="name">
    ...
</div>

spread attribute support

<div {...{class:'a', style: 'color: white'}}></div>

Change Log

v0.0.6

  • add v-if support

v0.0.5

  • bug fix

v0.0.4

  • add v-show support

v0.0.3

  • add slot support

v0.0.2

  • support spread attribute on element