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

Commit bfecb8c

Browse files
jolafritesis0k0
authored andcommitted
fix: array env args are serialized when sent to webpack (#614)
1 parent 93c5f77 commit bfecb8c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: lib/compiler.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,16 @@ function buildEnvCommandLineParams(config, envData, $logger) {
110110
envFlagNames.splice(snapshotEnvIndex, 1);
111111
}
112112

113-
return envFlagNames.map(item => `--env.${item}=${envData[item]}`);
113+
const args = [];
114+
envFlagNames.map(item => {
115+
let envValue = envData[item];
116+
if(!Array.isArray(envValue)) {
117+
envValue = [envValue];
118+
}
119+
envValue.map(value => args.push(`--env.${item}=${value}`))
120+
});
121+
122+
return args;
114123
}
115124

116125
function logSnapshotWarningMessage($logger) {

0 commit comments

Comments
 (0)