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

Commit 385697f

Browse files
Dimitar Tachevsis0k0
Dimitar Tachev
authored andcommitted
fix: avoid getting the bool params as strings in the webpack config like a truthy "false". (#669)
1 parent 422bec4 commit 385697f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: lib/compiler.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,17 @@ function buildEnvCommandLineParams(config, envData, $logger) {
135135
const args = [];
136136
envFlagNames.map(item => {
137137
let envValue = envData[item];
138-
if (!Array.isArray(envValue)) {
139-
envValue = [envValue];
138+
if (typeof envValue === "boolean") {
139+
if (envValue) {
140+
args.push(`--env.${item}`);
141+
}
142+
} else {
143+
if (!Array.isArray(envValue)) {
144+
envValue = [envValue];
145+
}
146+
147+
envValue.map(value => args.push(`--env.${item}=${value}`))
140148
}
141-
envValue.map(value => args.push(`--env.${item}=${value}`))
142149
});
143150

144151
return args;

0 commit comments

Comments
 (0)