Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Aug 24, 2020
1 parent 37354fd commit a42692d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/webpack-cli/lib/groups/ConfigGroup.js
Expand Up @@ -146,7 +146,7 @@ class ConfigGroup extends GroupHelper {
if (config.length > 0) {
const resolvedOptions = [];
const finalizedConfigs = config.map(async (webpackConfig) => {
const configPath = resolve(process.cwd(), webpackConfig);
const configPath = resolve(webpackConfig);
const configFiles = getConfigInfoFromFileName(configPath);
if (!configFiles.length) {
throw new ConfigError(`The specified config file doesn't exist in ${configPath}`);
Expand All @@ -163,7 +163,7 @@ class ConfigGroup extends GroupHelper {
resolvedOptions.push(resolvedOption.options);
}
}
// When the resolved configs are more then 1, then pass them as Array [{...}, {...}] else pass the first config object {...}
// When the resolved configs are more than 1, then pass them as Array [{...}, {...}] else pass the first config object {...}
const finalOptions = resolvedOptions.length > 1 ? resolvedOptions : resolvedOptions[0] || {};

this.opts['options'] = finalOptions;
Expand Down

0 comments on commit a42692d

Please sign in to comment.