Permalink
Browse files

Control whether Metro tells Babel to lookup .babelrc files

Summary:
This adds support to RN's configuration file to let people turn off Babel's behavior of looking up .babelrc files. Most of the support for this feature is in Metro (facebook/metro#31).
Closes #15136

Differential Revision: D5483241

Pulled By: jeanlauliac

fbshipit-source-id: c78096c1574c9f844c9f34aff73e6f97cb0b5e45
  • Loading branch information...
ide committed Jul 26, 2017
1 parent 07de855 commit 9194b9da80b9c7e1bd31d5ecffa981f34e6baf3a
Showing with 9 additions and 0 deletions.
  1. +1 −0 local-cli/server/runServer.js
  2. +8 −0 local-cli/util/Config.js
@@ -158,6 +158,7 @@ function getPackagerServer(args, config) {
assetExts: defaultAssetExts.concat(args.assetExts),
blacklistRE: config.getBlacklistRE(),
cacheVersion: '3',
enableBabelRCLookup: config.getEnableBabelRCLookup(),
extraNodeModules: config.extraNodeModules,
getTransformOptions: config.getTransformOptions,
hasteImpl: config.hasteImpl,
View
@@ -49,6 +49,13 @@ export type ConfigT = {
*/
getBlacklistRE(): RegExp,
/**
* Specify whether or not to enable Babel's behavior for looking up .babelrc
* files. If false, only the .babelrc file (if one exists) in the main project
* root is used.
*/
getEnableBabelRCLookup(): boolean,
/**
* Specify any additional polyfill modules that should be processed
* before regular module loading.
@@ -158,6 +165,7 @@ const Config = {
extraNodeModules: Object.create(null),
getAssetExts: () => [],
getBlacklistRE: () => blacklist(),
getEnableBabelRCLookup: () => true,
getPlatforms: () => [],
getPolyfillModuleNames: () => [],
getProjectRoots: () => {

0 comments on commit 9194b9d

Please sign in to comment.