Babel Plugin for Removing React Test ID Props
JSON →The `babel-plugin-react-test-id` package provides a Babel plugin designed to automatically remove specified props, such as `testID`, from React components during the build process. This is particularly useful for optimizing production bundles by eliminating test-specific attributes that are not needed in the final deployed application, thereby reducing bundle size and preventing the exposure of internal testing implementation details. The current stable version is 1.0.2. As a build-time utility, its release cadence is typically slow, with updates primarily driven by changes in Babel's API or feature requests for additional prop removal customization. It differentiates itself by offering a straightforward, declarative way to strip these attributes without manual refactoring or conditional rendering logic within components, ensuring a clean separation between testing instrumentation and production code.
Traffic · last 30 days ↓12% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France