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 authored 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit ad0779f

Please sign in to comment.