From afa3307659198bcaab84612b083984d30fd3f468 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Wed, 14 Feb 2018 08:42:28 -0800 Subject: [PATCH] Fix enableBabelRCLookup option in new CLI + global cache script Reviewed By: BYK Differential Revision: D6977885 fbshipit-source-id: 50245e046c7639f9fb4022a9cc5974d50831524c --- packages/metro/src/Config.js | 2 +- packages/metro/src/index.js | 1 + packages/metro/src/shared/types.flow.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/metro/src/Config.js b/packages/metro/src/Config.js index 21cd3405..0107c802 100644 --- a/packages/metro/src/Config.js +++ b/packages/metro/src/Config.js @@ -166,7 +166,7 @@ const DEFAULT = ({ dynamicDepsInPackages: 'throwAtRuntime', getAssetExts: () => [], getBlacklistRE: () => blacklist(), - getEnableBabelRCLookup: () => false, + getEnableBabelRCLookup: () => true, getPlatforms: () => [], getPolyfillModuleNames: () => [], // We assume the default project path is two levels up from diff --git a/packages/metro/src/index.js b/packages/metro/src/index.js index 604d079d..17c935ec 100644 --- a/packages/metro/src/index.js +++ b/packages/metro/src/index.js @@ -125,6 +125,7 @@ async function runMetro({ blacklistRE: normalizedConfig.getBlacklistRE(), createModuleIdFactory: normalizedConfig.createModuleIdFactory, dynamicDepsInPackages: normalizedConfig.dynamicDepsInPackages, + enableBabelRCLookup: normalizedConfig.getEnableBabelRCLookup(), extraNodeModules: normalizedConfig.extraNodeModules, getPolyfills: normalizedConfig.getPolyfills, getModulesRunBeforeMainModule: diff --git a/packages/metro/src/shared/types.flow.js b/packages/metro/src/shared/types.flow.js index 0d2cb150..95465616 100644 --- a/packages/metro/src/shared/types.flow.js +++ b/packages/metro/src/shared/types.flow.js @@ -78,7 +78,7 @@ export type Options = {| cacheVersion?: string, createModuleIdFactory?: () => (path: string) => number, +dynamicDepsInPackages: DynamicRequiresBehavior, - enableBabelRCLookup?: boolean, + enableBabelRCLookup: boolean, extraNodeModules?: {}, getPolyfills: ({platform: ?string}) => $ReadOnlyArray, getTransformOptions?: GetTransformOptions,