Skip to content

Commit

Permalink
fix: show '--node-env' in minimum help output (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored Feb 8, 2021
1 parent 78e2fa7 commit f5fc302
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value
--node-env <value> Sets process.env.NODE_ENV to the specified value.
-h, --hot Enables Hot Module Replacement
--no-hot Disables Hot Module Replacement.
--analyze It invokes webpack-bundle-analyzer plugin to get bundle information.
Expand Down
1 change: 1 addition & 0 deletions packages/webpack-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ npx webpack-cli --help verbose
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
-j, --json [value] Prints result as JSON or store it in a file.
-d, --devtool <value> Determine source maps to use.
Expand Down
3 changes: 2 additions & 1 deletion packages/webpack-cli/lib/webpack-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ class WebpackCLI {
'json',
'name',
'output-path',
'node-env',
];

const builtInFlags = [
Expand Down Expand Up @@ -299,7 +300,7 @@ class WebpackCLI {
name: 'node-env',
type: String,
multiple: false,
description: 'Sets process.env.NODE_ENV to the specified value',
description: 'Sets process.env.NODE_ENV to the specified value.',
},

// Adding more plugins
Expand Down

0 comments on commit f5fc302

Please sign in to comment.