Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add name flag #1757

Merged
merged 4 commits into from Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/webpack-cli/README.md
Expand Up @@ -44,6 +44,7 @@ yarn add webpack-cli --dev
--color Enables colors on console
--no-color Disable colors on console
--env string Environment passed to the configuration when it is a function
--name string Name of the configuration. Used when loading multiple configurations
--help Outputs list of supported flags
-o, --output string Output location of the file generated by webpack
-t, --target string Sets the build target
Expand Down
3 changes: 3 additions & 0 deletions packages/webpack-cli/lib/groups/BasicGroup.js
Expand Up @@ -33,6 +33,9 @@ class BasicGroup extends GroupHelper {
if (arg === 'devtool') {
options.devtool = args[arg];
}
if (arg === 'name') {
options.name = args[arg];
}
if (arg === 'entry') {
options[arg] = this.resolveFilePath(args[arg], 'index.js');
if (options[arg].length === 0) {
Expand Down