Skip to content

Commit

Permalink
docs(configuration): mention default watchOptions.poll value (webpack…
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan authored Sep 26, 2022
1 parent 10fd714 commit bde990a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/configuration/watch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ contributors:
- Neob91
- Loonride
- snitin315
- chenxsan
---

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.
Expand Down Expand Up @@ -128,7 +129,7 @@ T> If you use `require.context`, webpack will watch your entire directory. You w

`boolean = false` `number`

Turn on [polling](<https://en.wikipedia.org/wiki/Polling_(computer_science)>) by passing `true`, or specifying a poll interval in milliseconds:
Turn on [polling](<https://en.wikipedia.org/wiki/Polling_(computer_science)>) by passing `true` which would set the default poll interval to [`5007`](https://github.com/webpack/watchpack/blob/a54bcdb95759558ca5a9fc2819c4d71b771c162f/lib/DirectoryWatcher.js#L79), or specifying a poll interval in milliseconds:

**webpack.config.js**

Expand Down

0 comments on commit bde990a

Please sign in to comment.