esbuild-plugin-annotate-react
v0.1.0
Published
An esbuild plugin that annotates React-rendered components with stable attributes to identify the source component.
Downloads
4
Maintainers
Readme
esbuild-plugin-annotate-react
An esbuild plugin that annotates React-rendered components with stable attributes to identify the source component.
Input:
// App.jsx
const MyComponent = () => {
return <div>Hello World</div>
}
Output:
const MyComponent = () => {
return React.createElement(
"div",
{ "data-component": "MyComponent" },
"Hello World"
);
}