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

fix: avoid getting the bool params as strings in the webpack config like a truthy "false". #669

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down