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
This commit is contained in:
parent
b91184885f
commit
140b230e84
|
@ -14,7 +14,7 @@ const getPolyfills = require('../../rn-get-polyfills');
|
|||
const path = require('path');
|
||||
|
||||
const {createBlacklist} = require('metro');
|
||||
const {loadConfig, mergeConfig} = require('metro-config');
|
||||
const {loadConfig} = require('metro-config');
|
||||
|
||||
/**
|
||||
* Configuration file of the CLI.
|
||||
|
@ -85,11 +85,10 @@ const Config = {
|
|||
getProjectRoots,
|
||||
|
||||
async load(configFile: ?string): Promise<ConfigT> {
|
||||
const config: ConfigT = await loadConfig(
|
||||
return await loadConfig(
|
||||
configFile ? {config: configFile} : {},
|
||||
this.DEFAULT,
|
||||
);
|
||||
|
||||
return mergeConfig(config, this.DEFAULT);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue