Skip to content

rrjohnson85/swc-plugin-react-auto-classnames

 
 

Repository files navigation

swc-plugin-react-auto-classnames

Automatically adds class names to all React components. Ex:

const MyComponent = () => <Component />;

will be transformed to

const MyComponent = () => <Component className="file-name-component" />;

Building

The .wasm binary is included in the root directory, which includes the functionality. To rebuild this binary, you can use cargo build-wasi --release. This generates a file under target/ - in order to commit this to a release you can copy to root with cp target/wasm32-wasi/release/swc_plugin_react_auto_classnames.wasm .. Ensure if releasing to bump the version strings in both the package.json (for the npm package) and the Cargo.toml file.

License

MIT

About

SWC plugin to automatically add classnames to React Components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%