Transpiles JSX to regular JavaScript. Current stable version is 0.8.7. This package is a lightweight JSX-to-JavaScript transpiler (~6.1kb, ~2.5kb gzipped) that converts JSX syntax into function calls. It offers configuration options like factory function, property quoting, and indentation. Unlike Babel or TypeScript, it is minimal and focused on standalone JSX transpilation without a full AST transformation. It uses CommonJS and is intended for Node.js environments.
npm install mxn-jsx-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require the module and transpile a simple JSX element with custom options.
Use CommonJS require() or a bundler that can handle CJS.
Set factory option to 'React.createElement' if using React.
Always pass options as: transpile(code, { factory: '...' })Use const transpile = require('mxn-jsx-transpiler') instead of import.Either define a function h, or set factory option to your actual function, e.g., React.createElement.
Ensure you call transpile(code) before executing the code, and that the code string contains JSX.
No dependency data recorded yet.