From 89a358f34786198c8a9a2d379588efd57b6a0eec Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Fri, 5 Oct 2018 11:31:17 -0700 Subject: [PATCH] Expose enableBabelRuntime config param externally Summary: Up until now the `enableBabelRuntime` option in the `metro-react-native-preset` package was hardcoded in the transformer: our internal transformer set it to `false` and the opensource one was `true`. This diff now exposes this param out to the config of Metro (now that it's quite easy to expose things) so anybody can set it to false or true. This allows our end to end tests to set it to false to not have to deal with requires to `babel/runtime`. Reviewed By: davidaurelio Differential Revision: D10123776 fbshipit-source-id: 97e744eeb567c8e86ab3c613ac71970d226ed2ca --- jest/preprocessor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest/preprocessor.js b/jest/preprocessor.js index 645dff600..320c8bb76 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -52,7 +52,7 @@ module.exports = { options: { ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044 dev: true, - disableBabelRuntime: true, + enableBabelRuntime: false, experimentalImportSupport: false, hot: false, inlineRequires: true,