mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
59e6b11fbc
Summary: X-link: https://github.com/facebook/metro/pull/1078 Pull Request resolved: https://github.com/facebook/react-native/pull/39159 Source is not required for `getPreset` of `react-native/babel-preset`. There is a codition that adds `react-native/babel-plugin-codegen` to the preset only if source is passing certain regex. This condition fails if source is null, but that's wrong because the plugin may still be requred for this transformation even though source is not provided. This diff changes the condition so the regexp tests source only if it is not null, and `react-native/babel-plugin-codegen` automatically added to the preset otherwise. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D48684443 fbshipit-source-id: 7cea69c91c0175ac0374d72e91f58e20fe75fd53