From 05cc3f525314185f97d863858f2b049aea01724e Mon Sep 17 00:00:00 2001 From: Genuifx Date: Thu, 5 Mar 2020 22:16:55 +0800 Subject: [PATCH] fix(cli): fix config merge --- packages/wxa-cli/src/getConfigs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/wxa-cli/src/getConfigs.js b/packages/wxa-cli/src/getConfigs.js index 2c76d226..0f6c998b 100644 --- a/packages/wxa-cli/src/getConfigs.js +++ b/packages/wxa-cli/src/getConfigs.js @@ -30,7 +30,7 @@ function loadConfigs(wxaConfigsPath) { function spawnConfigs(configs) { - if (!configs.thirdParty && configs.dispense) return [configs]; + if (!configs.thirdParty && !configs.dispense) return [configs]; let platform = configs.thirdParty || configs.dispense || []; @@ -38,7 +38,7 @@ function spawnConfigs(configs) { delete configs.dispense; let platformConfigs = platform.map((item) => { - return {configs, ...item, $name: item.name}; + return {...configs, ...item, $name: item.name}; }); platformConfigs.unshift({...configs, $name: 'default'});