Babel plugin for transforming JSX with BEM props into class names using reBEM conventions. Current version 0.3.3, last updated 2016. Allows writing BEM-style props (block, elem, mods, mix) on JSX elements, which are compiled to CSS class strings. Integrates with webpack via DefinePlugin for environment variables. Key differentiator: integrates BEM methodology directly into React JSX, avoiding manual className management. Suitable for projects using BEM naming with React.
npm install babel-plugin-transform-rebem-jsxVerified import paths — ran on the pinned version, not inferred.
Shows installation, Babel config, webpack DefinePlugin setup, and JSX usage with block and mods props.
Add DefinePlugin to webpack config as shown in quickstart.
Upgrade to >=0.3.1.
Upgrade to >=0.3.2.
Upgrade to >=0.3.3.
npm i -S rebem-classname
Upgrade to >=0.3.2 or ensure props are always objects.