diff --git a/OPTIONS.md b/OPTIONS.md index 06a04206bfb..ad5e4473f34 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -9,7 +9,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value + --node-env 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. diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index a7248a715c6..86941f9f47a 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -85,6 +85,7 @@ npx webpack-cli --help verbose --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. --env Environment passed to the configuration when it is a function. + --node-env 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 Determine source maps to use. diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index a95c28eebe1..6e049c5b19d 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -241,6 +241,7 @@ class WebpackCLI { 'json', 'name', 'output-path', + 'node-env', ]; const builtInFlags = [ @@ -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