Pragma Comments
Package: @autotracer/plugin-babel-react19 · Layer: Build · Type: Reference
Pragma comments are build-time line comments that @autotracer/plugin-babel-react19 reads while transforming eligible React components through Babel.
They are not a React feature and they are not JavaScript directives. In AutoTracer, they are per-component override comments used during build-time injection.
Use them immediately above an eligible top-level component declaration. The shared React 19 transformer reads function-level leading comments for top-level component declarations and component variable declarations.
Read together with mode, include, and exclude.
Supported Comments
@trace
Use // @trace to enable instrumentation for one eligible component.
// @trace
export function CheckoutPanel() {
return <section />;
}@trace-disable
Use // @trace-disable to disable instrumentation for one eligible component.
// @trace-disable
export function AnimatedSpinner() {
return <div />;
}Precedence
- A file and component must pass
includeandexcludefirst. - Inside that eligible set,
@trace-disablewins over@trace. modedecides the fallback only when no pragma settled the result.
@trace never rescues a component that misses include or matches exclude.