mirror of
https://github.com/status-im/metro.git
synced 2025-02-03 14:54:05 +00:00
298d8b3e3e
Summary: Adding a Babel plugin that will analyze the file looking for any potential candidate to use `regenerator-runtime`, and if so, will inject dynamically the module. The module is injected per file, so we avoid polluting the global environment. The plugin is also able to inject the `require` call beforehand, so that the inliner can pick them and inline them. The Babel plugin is part of `react-native-babel-preset`, so as long as you are using this preset you are safe. If not, you should include the specific transformer into your list of plugins, as `react-native-babel-preset/transforms/transform-regenerator-runtime-insertion.js`. Reviewed By: davidaurelio Differential Revision: D5321193 fbshipit-source-id: fd4805b28c8a2b986842e23570a64003370d2067