Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
fix: array env args are serialized when sent to webpack (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolafrite authored and sis0k0 committed Jul 19, 2018
1 parent 93c5f77 commit bfecb8c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ function buildEnvCommandLineParams(config, envData, $logger) {
envFlagNames.splice(snapshotEnvIndex, 1);
}

return envFlagNames.map(item => `--env.${item}=${envData[item]}`);
const args = [];
envFlagNames.map(item => {
let envValue = envData[item];
if(!Array.isArray(envValue)) {
envValue = [envValue];
}
envValue.map(value => args.push(`--env.${item}=${value}`))
});

return args;
}

function logSnapshotWarningMessage($logger) {
Expand Down

0 comments on commit bfecb8c

Please sign in to comment.