A Rollup plugin that transforms Vue JSX syntax (e.g., <div className="hehe">) into Vue 3 compatible render functions using createVNode. Version 0.0.6 is the current stable release; it works alongside rollup-plugin-esbuild and the esbuild jsxFactory option. Unlike Babel-based Vue JSX plugins, this leverages esbuild for fast compilation and includes a built-in runtime helper (vueJsxCompat) to bridge esbuild's JSX output to Vue's createVNode. The plugin injects the transform automatically and allows custom JSX transformer paths. Ships TypeScript definitions, but the user must configure esbuild's jsxFactory option separately.
npm install rollup-plugin-vue-jsx-compatVerified import paths — ran on the pinned version, not inferred.
Shows minimal Rollup configuration using vue-jsx-compat with esbuild plugin, setting jsxFactory to the injected helper.
In your esbuild configuration, add: jsxFactory: 'vueJsxCompat'
Use a Vue 2 compatible JSX plugin (e.g., @vue/babel-plugin-jsx) or upgrade to Vue 3.
Pin to exact version and test upgrades manually.
Ensure vueJsx() is added as a Rollup plugin before esbuild, and set esbuild's jsxFactory option to 'vueJsxCompat'.
Install 'vue' (npm install vue) and import from 'vue' in your entry point, or ensure your Rollup config resolves 'vue'.