Skip to content

Commit

Permalink
feat: add name flag (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Aug 21, 2020
1 parent 88c5290 commit ad0779f
Show file tree
Hide file tree
Showing 6 changed files with 272 additions and 239 deletions.
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

0 comments on commit ad0779f

Please sign in to comment.