Babel plugin for aliasing JSX properties, primarily used to map testID to accessibilityLabel for React Native Appium testing. Current stable version is 2.0.0 (2018). Low release cadence; primarily a utility for QA builds. Key differentiator: it solves a specific React Native + Appium incompatibility without polluting production code, and supports environment whitelisting via ALIAS_ENVIRONMENT variable. Alternatives: manual testID duplication, but this plugin automates the transform.
npm install babel-plugin-jsx-property-aliasVerified import paths — ran on the pinned version, not inferred.
Configures Babel to replace testID with accessibilityLabel when BABEL_ENV is set to 'appium'.
Use the new 'properties' object instead of 'from'/'to' arrays. See README for v2 API.
Ensure that components do not have both testID and accessibilityLabel set manually, or accept that testID will overwrite.
Set ALIAS_ENVIRONMENT to 'appium' (or your custom env name) in your React Native build scripts.
Run 'npm install --save-dev babel-plugin-jsx-property-alias'
Use array syntax: ["jsx-property-alias", { "properties": { ... } }]