
npm install vue-jsx-factory!NPM
Compile Vue JSX and TSX with tsc or esbuild.
``json`
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "j"
}
}
`jsx
// j must be in scope, even though it looks unused
import { j } from "vue-jsx-factory";
import CompositionApi, { defineComponent } from "@vue/composition-api";
import Vue from "vue";
Vue.use(CompositionApi);
const App = defineComponent({
data() {
return {
count: 0,
};
},
render() {
return (
new Vue({ render: (h) => h(App) }).$mount("#app");
`
yarn start will create a development server, with even more examples from /src/components`.
- Hot module reloading