Skip to content

Commit

Permalink
Expose enableBabelRuntime config param externally
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rafeca authored and facebook-github-bot committed Oct 5, 2018
1 parent 6967a4f commit 89a358f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 89a358f

Please sign in to comment.