You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/configuration/watch.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ contributors:
7
7
- SpaceK33z
8
8
- EugeneHlushko
9
9
- byzyk
10
+
- spicalous
10
11
---
11
12
12
13
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.
@@ -74,17 +75,19 @@ module.exports = {
74
75
};
75
76
```
76
77
77
-
It is also possible to use [anymatch](https://github.com/micromatch/anymatch) patterns:
78
+
It is also possible to have and use multiple[anymatch](https://github.com/micromatch/anymatch) patterns:
78
79
79
80
```js
80
81
module.exports= {
81
82
//...
82
83
watchOptions: {
83
-
ignored:'files/**/*.js'
84
+
ignored:['files/**/*.js', 'node_modules']
84
85
}
85
86
};
86
87
```
87
88
89
+
T> If you use `require.context`, webpack will watch your entire directory. You will need to ignore files and/or directories so that unwanted changes will not trigger a rebuild.
0 commit comments