Skip to content

feat: add --config-name flag#1753

Merged
alexander-akait merged 2 commits intonextfrom
feat/config-name
Aug 19, 2020
Merged

feat: add --config-name flag#1753
alexander-akait merged 2 commits intonextfrom
feat/config-name

Conversation

@snitin315
Copy link
Member

@snitin315 snitin315 commented Aug 18, 2020

What kind of change does this PR introduce?
Feature

Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
Yes
Summary
Addition of --config-name flag.

Does this PR introduce a breaking change?
No

Other information
Fixes #1657

@anshumanv
Copy link
Member

I think it makes sense to add multiple config support using flags first.

@snitin315
Copy link
Member Author

snitin315 commented Aug 18, 2020

--config-name works with a single config file exporting an array of configurations.

https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations

@snitin315 snitin315 marked this pull request as ready for review August 18, 2020 08:10
@snitin315 snitin315 requested a review from a team as a code owner August 18, 2020 08:10
const newOptions = configOptions(formattedEnv, argv);
// When config function returns a promise, resolve it, if not it's resolved by default
newOptionsObject['options'] = await Promise.resolve(newOptions);
} else if (Array.isArray(configOptions) && this.args.configName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment when this block is executed, can give example, looks good otherwise

@snitin315
Copy link
Member Author

This commitlint check is unstable these days. Can we remove it as a required check?

@alexander-akait
Copy link
Member

@snitin315 maybe we should update commitlint action, need look at this

@anshumanv
Copy link
Member

@snitin315 maybe we should update commitlint action, need look at this

I think it's setup externally, not defined in the workflow file. @evenstensberg do you know how it's setup?

@jamesgeorge007
Copy link
Member

It seems we're relying on commitlint-bot which is not maintained anymore, it is advised to use semantic-pull-requests instead.

@alexander-akait alexander-akait merged commit d3ed19a into next Aug 19, 2020
@alexander-akait alexander-akait deleted the feat/config-name branch August 19, 2020 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support setting the config name for multiple configs

8 participants