A Babel plugin that transforms JSX in Vue 2.0 projects with TypeScript support. Version 3510.0.3 (non-semver, likely a fork) builds on babel-plugin-transform-vue-jsx to handle strict TypeScript JSX type checking, such as allowing custom component tags (e.g. RouterLink) via an 'anyslot' helper. It auto-injects h (createElement) into methods and getters. Requires babel-helper-vue-jsx-merge-props as a peer dependency. Compatible with Vue 2.0 and Babel 6. Not actively maintained.
npm install babel-plugin-transform-vue-tsxVerified import paths — ran on the pinned version, not inferred.
Setting up the plugin in .babelrc and using JSX with TypeScript, including the anyslot helper for custom components.
Consider migrating to Vue 3 and using @vue/babel-plugin-jsx which is officially maintained.
Use method syntax instead of arrow functions. For example: render() { return <div/>; } instead of render: () => <div/>.Install the peer dependency: npm install --save-dev babel-helper-vue-jsx-merge-props
Use the anyslot helper from vue-tsx-helper: <anyslot is="router-link" to="/">...</anyslot>
For Vue 3, use @vue/babel-plugin-jsx. For Babel 7, check compatibility or use @babel/preset-env.
Use ES2015 method syntax: render() { ... } instead of render: () => { ... }.Use the anyslot helper: <anyslot is="router-link" to="/">...</anyslot>
Install the package: npm install --save-dev babel-helper-vue-jsx-merge-props
For Babel 7, install @babel/plugin-syntax-jsx instead of babel-plugin-syntax-jsx. Or use @babel/preset-env.