Babel plugin to instrument React components with custom transforms
Develop a small Babel-based helper that wraps React class components with configured transform wrappers during compilation while leaving non-component code untouched.
@generates
/**
* Transforms JSX/ES6 source so React class components are wrapped with configured transforms.
* @param {string} sourceCode - The source text containing potential React class components.
* @param {string} filename - Used for deterministic component identifiers in generated wrappers.
* @returns {string} The transformed source with wrapper calls.
*/
export function instrumentSource(sourceCode, filename);Wraps React components with configured transforms during Babel compilation.
Runs the transform pipeline that applies the plugin and returns transformed code.
Parses JSX in the source being transformed.
tessl i tessl/npm-babel-plugin-react-transform@3.0.0evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9