estree-util-build-jsx is a utility designed to transform JSX nodes within an ESTree (Abstract Syntax Tree) into standard function calls, such as those used by `h` (hyperscript) functions for React, Preact, or custom renderers. This package currently stands at version 3.0.1, with recent major updates in 3.0.0 introducing breaking changes like ESM-only distribution and requiring Node.js 16+. Its release cadence is active, with consistent updates and bug fixes. A key differentiator is its focus on AST transformation rather than full code compilation, making it suitable for pipelines where an AST is already available (e.g., from Acorn or other parsers). Unlike comprehensive compilers like SWC or esbuild, it does not parse raw source code. It also has specific behavioral differences compared to Babel's JSX transform, such as explicit support for namespaces and different handling of `this` as a component.
Verified import paths — ran on the pinned version, not inferred.
Package is ESM-only since v2.0.0; CommonJS require() is not supported.
Type import for configuration; avoid importing as a value.
Type import for the JSX runtime configuration; avoid importing as a value.
This quickstart demonstrates parsing JSX with `acorn-jsx`, transforming the resulting ESTree using `buildJsx` to convert JSX elements into function calls, and then converting the modified tree back into JavaScript code.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.