Skip to content

Commit 140b230

Browse files
Ives van Hoornefacebook-github-bot
authored andcommitted
Change react-native config loading to provide an override for the default config.
Summary: Instead of overriding the config at the end we now do it right after applying default config and before the user config is applied. Reviewed By: rafeca Differential Revision: D9131758 fbshipit-source-id: 15e575fc11a781187f3ee2fa7cf81c227cf6a088
1 parent b911848 commit 140b230

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

local-cli/util/Config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const getPolyfills = require('../../rn-get-polyfills');
1414
const path = require('path');
1515

1616
const {createBlacklist} = require('metro');
17-
const {loadConfig, mergeConfig} = require('metro-config');
17+
const {loadConfig} = require('metro-config');
1818

1919
/**
2020
* Configuration file of the CLI.
@@ -85,11 +85,10 @@ const Config = {
8585
getProjectRoots,
8686

8787
async load(configFile: ?string): Promise<ConfigT> {
88-
const config: ConfigT = await loadConfig(
88+
return await loadConfig(
8989
configFile ? {config: configFile} : {},
90+
this.DEFAULT,
9091
);
91-
92-
return mergeConfig(config, this.DEFAULT);
9392
},
9493
};
9594

0 commit comments

Comments
 (0)