From 7dc9a52a484be6f06ddfef35f9e1d768211b92d5 Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Fri, 21 Sep 2018 16:17:51 +0300 Subject: [PATCH] fix: avoid getting the bool params as strings in the webpack config like a truthy "false". --- lib/compiler.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/compiler.js b/lib/compiler.js index 8ba42f9c..159c366a 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -135,10 +135,17 @@ function buildEnvCommandLineParams(config, envData, $logger) { const args = []; envFlagNames.map(item => { let envValue = envData[item]; - if (!Array.isArray(envValue)) { - envValue = [envValue]; + if (typeof envValue === "boolean") { + if (envValue) { + args.push(`--env.${item}`); + } + } else { + if (!Array.isArray(envValue)) { + envValue = [envValue]; + } + + envValue.map(value => args.push(`--env.${item}=${value}`)) } - envValue.map(value => args.push(`--env.${item}=${value}`)) }); return args;