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

docs(api): add --fail-on-warnings cli option #6320

Closed
wants to merge 1 commit into from
Closed
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
49 changes: 25 additions & 24 deletions src/content/api/cli.mdx
Expand Up @@ -244,30 +244,31 @@ npx webpack watch --mode development

By default webpack ships with the following flags:

| Flag / Alias | Type | Description |
| ----------------------------------- | --------------- | ----------------------------------------------------------------------- |
| [`--entry`](#entry) | string[] | The entry point(s) of your application e.g. `./src/main.js` |
| [`--config, -c`](#config) | string[] | Provide path to a webpack configuration file e.g. `./webpack.config.js` |
| [`--config-name`](#config-name) | string[] | Name of the configuration to use |
| `--name` | string | Name of the configuration. Used when loading multiple configurations |
| `--color` | boolean | Enable colors on console |
| [`--merge, -m`](#merge) | boolean | Merge two or more configurations using `webpack-merge` |
| [`--env`](#env) | string[] | Environment passed to the configuration when it is a function |
| [`--node-env`](#node-env) | string | Set `process.env.NODE_ENV` to the specified value |
| [`--progress`](#progress) | boolean, string | Print compilation progress during build |
| [`--help`](#help) | boolean | Outputs list of supported flags and commands |
| [`--output-path, -o`](#output-path) | string | Output location of the file generated by webpack e.g. `./dist` |
| `--target, -t` | string[] | Sets the build target |
| `--watch, -w` | boolean | Watch for file changes |
| `--watch-options-stdin` | boolean | Stop watching when stdin stream has ended |
| `--hot, -h` | boolean | Enables Hot Module Replacement |
| `--devtool, -d` | string | Controls if and how source maps are generated. |
| `--prefetch` | string | Prefetch this request |
| [`--json, -j`](#json) | boolean, string | Prints result as JSON or store it in a file |
| `--mode` | string | Defines the mode to pass to webpack |
| [`--version, -v`](#version) | boolean | Get current version |
| `--stats` | boolean, string | It instructs webpack on how to treat the stats |
| [`--analyze`](#analyzing-bundle) | boolean | It invokes `webpack-bundle-analyzer` plugin to get bundle information |
| Flag / Alias | Type | Description |
| ----------------------------------- | --------------- | ------------------------------------------------------------------------- |
| [`--entry`](#entry) | string[] | The entry point(s) of your application e.g. `./src/main.js` |
| [`--config, -c`](#config) | string[] | Provide path to a webpack configuration file e.g. `./webpack.config.js` |
| [`--config-name`](#config-name) | string[] | Name of the configuration to use |
| `--name` | string | Name of the configuration. Used when loading multiple configurations |
| `--color` | boolean | Enable colors on console |
| [`--merge, -m`](#merge) | boolean | Merge two or more configurations using `webpack-merge` |
| [`--env`](#env) | string[] | Environment passed to the configuration when it is a function |
| [`--node-env`](#node-env) | string | Set `process.env.NODE_ENV` to the specified value |
| [`--progress`](#progress) | boolean, string | Print compilation progress during build |
| [`--help`](#help) | boolean | Outputs list of supported flags and commands |
| [`--output-path, -o`](#output-path) | string | Output location of the file generated by webpack e.g. `./dist` |
| `--target, -t` | string[] | Sets the build target |
| `--watch, -w` | boolean | Watch for file changes |
| `--watch-options-stdin` | boolean | Stop watching when stdin stream has ended |
| `--hot, -h` | boolean | Enables Hot Module Replacement |
| `--devtool, -d` | string | Controls if and how source maps are generated. |
| `--prefetch` | string | Prefetch this request |
| [`--json, -j`](#json) | boolean, string | Prints result as JSON or store it in a file |
| `--mode` | string | Defines the mode to pass to webpack |
| [`--version, -v`](#version) | boolean | Get current version |
| `--stats` | boolean, string | It instructs webpack on how to treat the stats |
| [`--analyze`](#analyzing-bundle) | boolean | It invokes `webpack-bundle-analyzer` plugin to get bundle information |
| `--fail-on-warnings` | boolean | Stop webpack-cli process with non-zero exit code on warnings from webpack |

### Negated Flags

Expand Down