From a3a69cae348b2bab0ec5ce68a56c6197cfa33ad6 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 8657cee6d25351..e21829e9a2b036 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,