Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show '--node-env' in minimum help output #2411

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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