Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add @react-native/babel-plugin-codegen to the preset if src is null (#…
…39159) Summary: X-link: facebook/metro#1078 Pull Request resolved: #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
- Loading branch information