@@ -64,15 +64,15 @@ _Note: The `publicPath` property is required, whereas all other options are opti
64
64
65
65
### headers
66
66
67
- Type: ` Object `
67
+ Type: ` Object `
68
68
Default: ` undefined `
69
69
70
70
This property allows a user to pass custom HTTP headers on each request. eg.
71
71
` { "X-Custom-Header": "yes" } `
72
72
73
73
### index
74
74
75
- Type: ` String `
75
+ Type: ` String `
76
76
Default: ` undefined `
77
77
78
78
"index.html",
@@ -82,21 +82,21 @@ Default: `undefined`
82
82
83
83
### lazy
84
84
85
- Type: ` Boolean `
85
+ Type: ` Boolean `
86
86
Default: ` undefined `
87
87
88
88
This option instructs the module to operate in 'lazy' mode, meaning that it won't
89
89
recompile when files change, but rather on each request.
90
90
91
91
### logger
92
92
93
- Type: ` Object `
93
+ Type: ` Object `
94
94
Default: [ ` webpack-log ` ] ( https://github.com/webpack-contrib/webpack-log/blob/master/index.js )
95
95
96
96
In the rare event that a user would like to provide a custom logging interface,
97
97
this property allows the user to assign one. The module leverages
98
98
[ ` webpack-log ` ] ( https://github.com/webpack-contrib/webpack-log#readme )
99
- for creating the [ ` loglevelnext ` ] ( https://github.com/shellscape/loglevelnext#readme )
99
+ for creating the [ ` loglevelnext ` ] ( https://github.com/shellscape/loglevelnext#readme )
100
100
logging management by default. Any custom logger must adhere to the same
101
101
exports for compatibility. Specifically, all custom loggers must have the
102
102
following exported methods at a minimum:
@@ -111,7 +111,7 @@ Please see the documentation for `loglevel` for more information.
111
111
112
112
### logLevel
113
113
114
- Type: ` String `
114
+ Type: ` String `
115
115
Default: ` 'info' `
116
116
117
117
This property defines the level of messages that the module will log. Valid levels
@@ -131,15 +131,15 @@ for logging management, and more information can be found on its page.
131
131
132
132
### logTime
133
133
134
- Type: ` Boolean `
134
+ Type: ` Boolean `
135
135
Default: ` false `
136
136
137
137
If ` true ` the log output of the module will be prefixed by a timestamp in the
138
138
` HH:mm:ss ` format.
139
139
140
140
### mimeTypes
141
141
142
- Type: ` Object `
142
+ Type: ` Object `
143
143
Default: ` null `
144
144
145
145
This property allows a user to register custom mime types or extension mappings.
@@ -148,15 +148,15 @@ eg. `{ 'text/html': [ 'phtml' ] }`. Please see the documentation for
148
148
149
149
### publicPath
150
150
151
- Type: ` String `
151
+ Type: ` String `
152
152
_ Required_
153
153
154
154
The public path that the middleware is bound to. _ Best Practice: use the same
155
155
` publicPath ` defined in your webpack config._
156
156
157
157
### reporter
158
158
159
- Type: ` Object `
159
+ Type: ` Object `
160
160
Default: ` undefined `
161
161
162
162
Allows users to provide a custom reporter to handle logging within the module.
@@ -165,23 +165,39 @@ for an example.
165
165
166
166
### serverSideRender
167
167
168
- Type: ` Boolean `
168
+ Type: ` Boolean `
169
169
Default: ` undefined `
170
170
171
171
Instructs the module to enable or disable the server-side rendering mode. Please
172
172
see [ Server-Side Rendering] ( #server-side-rendering ) for more information.
173
173
174
174
### stats
175
- Type: ` Object `
175
+
176
+ Type: ` Object `
176
177
Default: ` { context: process.cwd() } `
177
178
178
179
Options for formatting statistics displayed during and after compile. For more
179
180
information and property details, please see the
180
181
[ webpack documentation] ( https://webpack.js.org/configuration/stats/#stats ) .
181
182
183
+ ### watchOffset
184
+
185
+ Type: ` Number `
186
+ Default: ` 11000 `
187
+
188
+ Watching (by means of ` lazy: false ` ) will frequently cause multiple compilations
189
+ as the bundle changes during compilation. This is due in part to cross-platform
190
+ differences in file watchers, so that webpack doesn't loose file changes when
191
+ watched files change rapidly. Since that scenario is more an edge case than not,
192
+ this option serves as a means to prevent multiple needless, identical compilations
193
+ by advancing start-time of a watcher by a number of seconds, which keeps generated
194
+ files from triggering the watch cycle.
195
+
196
+ _ To disable this prevention, set this option to a value of ` 0 ` ._
197
+
182
198
### watchOptions
183
199
184
- Type: ` Object `
200
+ Type: ` Object `
185
201
Default: ` { aggregateTimeout: 200 } `
186
202
187
203
The module accepts an ` Object ` containing options for file watching, which is
0 commit comments