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

Update docs with info-verbosity option #1817

Merged
merged 4 commits into from
Feb 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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