{"id":24958,"library":"babel-plugin-remove-style","title":"babel-plugin-remove-style","description":"A Babel plugin that removes `style` props from React JSX elements, primarily used to simplify snapshot testing by excluding inline styles. Version 0.1.0 is the current and only stable release. It operates as a Babel transform, stripping style attributes during transpilation. Unlike mocking CSS modules or disabling style processing, this plugin provides a brute-force removal without side effects. Developed by Hylozoic, it targets test environments where style details are irrelevant. No updates since initial release; minimal community adoption.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/Hylozoic/babel-plugin-remove-style","tags":["javascript","babel","plugin","css","modules","style","jsx","react"],"install":[{"cmd":"npm install babel-plugin-remove-style","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-remove-style","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-remove-style","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CJS-only; no ESM export. Use require in Babel config.","wrong":"import plugin from 'babel-plugin-remove-style'","symbol":"default","correct":"module.exports = require('babel-plugin-remove-style')"}],"quickstart":{"code":"// .babelrc or babel.config.js\n{\n  \"env\": {\n    \"test\": {\n      \"plugins\": [\"babel-plugin-remove-style\"]\n    }\n  }\n}\n\n// input.jsx\nconst Comp = () => <div style={{ color: 'red' }}>hi</div>;\n// output.jsx\nconst Comp = () => <div>hi</div>;","lang":"javascript","description":"Configures the plugin to remove style props in test environment, showing JSX transformation."},"warnings":[{"fix":"Use only in test environment; not for production builds.","message":"Plugin removes all style props unconditionally; no selective removal or options.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Run jest with --no-cache or clear cache manually.","message":"Jest caches transpiled code; may need --no-cache flag after installing plugin.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use full package name: ['babel-plugin-remove-style']","cause":"Babel config uses short name 'remove-style' but package is 'babel-plugin-remove-style'. Babel only auto-resolves 'babel-plugin-' prefix for official or well-known plugins.","error":"Plugin not found: 'remove-style'"},{"fix":"Use require('babel-plugin-remove-style') or in .babelrc as string.","cause":"ESM import syntax used for CJS plugin.","error":"TypeError: .default is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}