Skip to content

Commit

Permalink
feat(client): provide option for disabling console warn messages
Browse files Browse the repository at this point in the history
Add noWarn client parameter.

resolves webpack-contrib#319
  • Loading branch information
Joseph Graniero committed Jul 10, 2018
1 parent 8d46df6 commit 1cffdba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Configuration options can be passed to the client by adding querystring paramete
* **overlay** - Set to `false` to disable the DOM-based client-side overlay.
* **reload** - Set to `true` to auto-reload the page when webpack gets stuck.
* **noInfo** - Set to `true` to disable informational console logging.
* **noWarn** - Set to `true` to disable warning console logging.
* **quiet** - Set to `true` to disable all console logging.
* **dynamicPublicPath** - Set to `true` to use webpack `publicPath` as prefix of `path`. (We can set `__webpack_public_path__` dynamically at runtime in the entry point, see note of [output.publicPath](https://webpack.js.org/configuration/output/#output-publicpath))
* **autoConnect** - Set to `false` to use to prevent a connection being automatically opened from the client to the webpack back-end - ideal if you need to modify the options using the `setOptionsAndConnect` function
Expand Down
3 changes: 3 additions & 0 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ function setOverrides(overrides) {
if (overrides.noInfo && overrides.noInfo !== 'false') {
options.log = false;
}
if (overrides.noWarn && overrides.noWarn !== 'false') {
options.warn = false;
}
if (overrides.name) {
options.name = overrides.name;
}
Expand Down

0 comments on commit 1cffdba

Please sign in to comment.