A Rollup plugin that transforms JSX syntax into JavaScript using jsx-transform. Version 1.0.3 is the latest stable release, with no recent updates. It allows configuring JSX factory functions and pragma options. Compared to alternatives like @rollup/plugin-babel with React preset or @rollup/plugin-sucrase, it is a lightweight, zero-config option for simple JSX transformation without full Babel setup. However, it is a thin wrapper around an unmaintained library (jsx-transform) and may not support modern JSX features like automatic runtime; it is best suited for legacy projects.
npm install rollup-plugin-jsxVerified import paths — ran on the pinned version, not inferred.
Shows how to configure rollup-plugin-jsx with a custom factory and pragma for JSX transformation in a Rollup build.
Consider using @rollup/plugin-babel with @babel/preset-react or @rollup/plugin-sucrase for full JSX support.
Use 'factory' option instead of 'pragma'.
Ensure the plugin is listed before other transforms in the Rollup config.
Run npm install jsx-transform
Use `import jsx from 'rollup-plugin-jsx'` (default import) instead of `import { jsx } from 'rollup-plugin-jsx'`Include React as a dependency, use an external globals, or use @rollup/plugin-node-resolve