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

Commit b7a657b

Browse files
author
Dimitar Tachev
authored
fix: avoid getting the bool params as strings in the webpack config like a truthy "false". (#669)
1 parent 50e1ad7 commit b7a657b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/compiler.js

Lines changed: 10 additions & 3 deletions
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)