Babel plugin to instrument React components with custom transforms
Create a helper that compiles supplied React-style component source and returns the instrumentation output produced by the dependency plugin, with emphasis on the component metadata map it generates.
isInFunction flags set to false. @testisInFunction is true. @testisInFunction false while omitting displayName. @test@generates
export async function buildComponentMetadata(sourceCode: string): Promise<{
code: string;
components: Record<string, { displayName?: string; isInFunction: boolean }>;
}>;The function compiles the provided React component source using the dependency plugin, returning both the transformed code and the per-component metadata map emitted by the plugin. Preserve the component identifiers as produced by the plugin; each map entry must include an isInFunction boolean and a displayName string when one is available.
Instruments React-style components and emits per-file component metadata used by registered transforms.
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