JSX transpiler that desugars JSX into plain JavaScript, decoupled from React. Current stable version is 2.4.1. Release cadence is low/infrequent. It provides configurable factory function names, spread attribute handling, and unknown tag patterns, making it suitable for use with Mercury, virtual-dom, or custom virtual DOM implementations. Key differentiators: not tied to React, supports browserify transforms, and offers fine-grained control over output.
npm install jsx-transformNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of fromString, fromFile, and browserifyTransform with custom factory.
Explicitly pass options matching your virtual DOM library (e.g., factory: 'mercury.h', spreadFn: 'Object.assign').
Use b.transform(jsx.browserifyTransform({ ext: '.jsx' })) or rename files to .jsx.Use unknownTagPattern for template-based rendering instead of boolean flags.
Pass `arrayChildren: false` to spread children as arguments.
Run `npm install jsx-transform` and ensure node_modules is in require/import path.
Use jsx-transform.fromString() or set up browserify transform to transpile .jsx files.
Make sure the factory function (e.g., mercury.h) is available in the output context, or define it as a global.
Ensure the path is a valid existing file path.
No dependency data recorded yet.