Skip to content

Commit

Permalink
fix(cli): fix config merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Genuifx committed Mar 5, 2020
1 parent 2dc9928 commit 05cc3f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wxa-cli/src/getConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ 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 || [];

delete configs.thirdParty;
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'});
Expand Down

0 comments on commit 05cc3f5

Please sign in to comment.