Skip to content

Commit

Permalink
docs(config): document info-verbosity option in watch.md (#1817)
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneHlushko authored and skipjack committed Feb 23, 2018
1 parent 7b89b9f commit 4354b9a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/content/configuration/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ contributors:
- sokra
- skipjack
- SpaceK33z
- EugeneHlushko
---

webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of tweaks you can make if watching does not work properly for you.


## `watch`

`boolean`
Expand All @@ -21,6 +23,7 @@ watch: false

T> In webpack-dev-server and webpack-dev-middleware watch mode is enabled by default.


## `watchOptions`

`object`
Expand All @@ -34,6 +37,7 @@ watchOptions: {
}
```


## `watchOptions.aggregateTimeout`

`number`
Expand All @@ -44,6 +48,7 @@ Add a delay before rebuilding once the first file changed. This allows webpack t
aggregateTimeout: 300 // The default
```


## `watchOptions.ignored`

For some systems, watching many file systems can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like `node_modules`:
Expand All @@ -58,6 +63,7 @@ It is also possible to use [anymatch](https://github.com/es128/anymatch) pattern
ignored: "files/**/*.js"
```


## `watchOptions.poll`

`boolean` `number`
Expand All @@ -71,6 +77,17 @@ poll: 1000 // Check for changes every second
T> If watching does not work for you, try out this option. Watching does not work with NFS and machines in VirtualBox.


## `info-verbosity`

`string`: `none` `info` `verbose`

Controls verbosity of the lifecycle messaging, e.g. the `Started watching files...` log. Setting `info-verbosity` to `verbose` will also message to console at the beginning and the end of incremental build. `info-verbosity` is set to `info` by default.

```bash
webpack --watch --info-verbosity verbose
```


## Troubleshooting

If you are experiencing any issues, please see the following notes. There are a variety of reasons why webpack might miss a file change.
Expand Down

0 comments on commit 4354b9a

Please sign in to comment.