mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
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 (https://github.com/facebook/metro-bundler/pull/31). Closes https://github.com/facebook/react-native/pull/15136 Differential Revision: D5483241 Pulled By: jeanlauliac fbshipit-source-id: c78096c1574c9f844c9f34aff73e6f97cb0b5e45
This commit is contained in:
committed by
Facebook Github Bot
parent
6ad5e2fa7c
commit
113e046444
@@ -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.
|
||||
@@ -164,6 +171,7 @@ const Config = {
|
||||
extraNodeModules: Object.create(null),
|
||||
getAssetExts: () => [],
|
||||
getBlacklistRE: () => blacklist(),
|
||||
getEnableBabelRCLookup: () => true,
|
||||
getPlatforms: () => [],
|
||||
getPolyfillModuleNames: () => [],
|
||||
getProjectRoots: () => {
|
||||
|
||||
Reference in New Issue
Block a user