A Babel plugin that removes styleName props from React JSX elements at build time. Developed to silence React warnings about unknown DOM props when using react-css-modules in test environments. Version 0.1.0 is the current and only stable release. This plugin is a niche utility for testing setups, with no updates since its initial release. It differs from alternatives that mock CSS modules by operating on the AST level, ensuring styleName props are completely removed from the output.
npm install babel-plugin-remove-stylenameNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Babel configuration to remove styleName props only in test environment.
Run jest with --no-cache flag or clear cache manually.
Use 'remove-stylename' as the plugin name.
Combine with other CSS module mocking in tests if needed.
Run 'npm install babel-plugin-remove-stylename --save-dev' and ensure node_modules is present.
Add '@babel/preset-react' to your Babel presets in test environment.
Verify the plugin is in the 'test' env section of Babel config and that Jest uses babel-jest.