Skip to content

Commit f5fc302

Browse files
authored
fix: show '--node-env' in minimum help output (#2411)
1 parent 78e2fa7 commit f5fc302

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

OPTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Options:
99
--config-name <value...> Name of the configuration to use.
1010
-m, --merge Merge two or more configurations using 'webpack-merge'.
1111
--env <value...> Environment passed to the configuration when it is a function.
12-
--node-env <value> Sets process.env.NODE_ENV to the specified value
12+
--node-env <value> Sets process.env.NODE_ENV to the specified value.
1313
-h, --hot Enables Hot Module Replacement
1414
--no-hot Disables Hot Module Replacement.
1515
--analyze It invokes webpack-bundle-analyzer plugin to get bundle information.

packages/webpack-cli/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ npx webpack-cli --help verbose
8585
--config-name <value...> Name of the configuration to use.
8686
-m, --merge Merge two or more configurations using 'webpack-merge'.
8787
--env <value...> Environment passed to the configuration when it is a function.
88+
--node-env <value> Sets process.env.NODE_ENV to the specified value.
8889
--progress [value] Print compilation progress during build.
8990
-j, --json [value] Prints result as JSON or store it in a file.
9091
-d, --devtool <value> Determine source maps to use.

packages/webpack-cli/lib/webpack-cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ class WebpackCLI {
241241
'json',
242242
'name',
243243
'output-path',
244+
'node-env',
244245
];
245246

246247
const builtInFlags = [
@@ -299,7 +300,7 @@ class WebpackCLI {
299300
name: 'node-env',
300301
type: String,
301302
multiple: false,
302-
description: 'Sets process.env.NODE_ENV to the specified value',
303+
description: 'Sets process.env.NODE_ENV to the specified value.',
303304
},
304305

305306
// Adding more plugins

0 commit comments

Comments
 (0)