File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed
src/content/configuration Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,71 @@ To disable:
332
332
npx webpack serve --no-client-progress
333
333
```
334
334
335
+ ### reconnect
336
+
337
+ ` boolean = true ` ` number `
338
+
339
+ <Badge text = " v4.4.0+" />
340
+
341
+ Tells dev-server the number of times it should try to reconnect the client. When ` true ` it will try to reconnect unlimited times.
342
+
343
+ ** webpack.config.js**
344
+
345
+ ``` javascript
346
+ module .exports = {
347
+ // ...
348
+ devServer: {
349
+ client: {
350
+ reconnect: true ,
351
+ },
352
+ },
353
+ };
354
+ ```
355
+
356
+ Usage via the CLI:
357
+
358
+ ``` bash
359
+ npx webpack serve --client-reconnect
360
+ ```
361
+
362
+ When set to ` false ` it will not try to reconnect.
363
+
364
+ ``` javascript
365
+ module .exports = {
366
+ // ...
367
+ devServer: {
368
+ client: {
369
+ reconnect: false ,
370
+ },
371
+ },
372
+ };
373
+ ```
374
+
375
+ Usage via the CLI:
376
+
377
+ ``` bash
378
+ npx webpack serve --no-client-reconnect
379
+ ```
380
+
381
+ You can also specify the exact number of times the client should try to reconnect.
382
+
383
+ ``` javascript
384
+ module .exports = {
385
+ // ...
386
+ devServer: {
387
+ client: {
388
+ reconnect: 5 ,
389
+ },
390
+ },
391
+ };
392
+ ```
393
+
394
+ Usage via the CLI:
395
+
396
+ ``` bash
397
+ npx webpack serve --client-reconnect 5
398
+ ```
399
+
335
400
### webSocketTransport
336
401
337
402
` 'ws' | 'sockjs' ` ` string `
You can’t perform that action at this time.
0 commit comments