Skip to content

Commit 458b240

Browse files
committed
fix formatting errors
1 parent 73721b5 commit 458b240

File tree

1 file changed

+73
-27
lines changed

1 file changed

+73
-27
lines changed

content/configuration/dev-server.md

Lines changed: 73 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ allowedHosts: [
7676

7777
To use this option with the CLI pass the `--allowed-hosts` option a comma-delimited string.
7878

79-
```
79+
```bash
8080
webpack-dev-server --entry /entry/file --output-path /output/path --allowed-hosts .host.com,host2.com
8181
```
8282

@@ -89,7 +89,8 @@ bonjour: true
8989
```
9090

9191
Usage via the CLI
92-
```
92+
93+
```bash
9394
webpack-dev-server --bonjour
9495
```
9596

@@ -106,20 +107,23 @@ clientLogLevel: "none"
106107
```
107108

108109
Usage via the CLI
109-
```
110+
111+
```bash
110112
webpack-dev-server --client-log-level none
111113
```
112114

113115
Possible values are `none`, `error`, `warning` or `info` (default).
114116

115117
Note that the console will *always* show bundle errors and warnings. This option only effects the message before it.
116118

119+
117120
## `devServer.color` - CLI only
118121

119122
`boolean`
120123

121124
Enables/Disables colors on the console.
122-
```
125+
126+
```bash
123127
webpack-dev-server --color
124128
```
125129

@@ -135,10 +139,12 @@ compress: true
135139
```
136140

137141
Usage via the CLI
138-
```
142+
143+
```bash
139144
webpack-dev-server --compress
140145
```
141146

147+
142148
## `devServer.contentBase`
143149

144150
`boolean` `string` `array`
@@ -166,10 +172,12 @@ contentBase: false
166172
```
167173

168174
Usage via the CLI
169-
```
175+
176+
```bash
170177
webpack-dev-server --content-base /path/to/content/dir
171178
```
172179

180+
173181
## `devServer.disableHostCheck`
174182

175183
`boolean`
@@ -181,10 +189,12 @@ disableHostCheck: true
181189
```
182190

183191
Usage via the CLI
184-
```
192+
193+
```bash
185194
webpack-dev-server --disable-host-check
186195
```
187196

197+
188198
## `devServer.filename` 🔑
189199

190200
`string`
@@ -248,7 +258,8 @@ historyApiFallback: {
248258
```
249259

250260
Usage via the CLI
251-
```
261+
262+
```bash
252263
webpack-dev-server --history-api-fallback
253264
```
254265

@@ -266,7 +277,8 @@ host: "0.0.0.0"
266277
```
267278

268279
Usage via the CLI
269-
```
280+
281+
```bash
270282
webpack-dev-server --host 0.0.0.0
271283
```
272284

@@ -295,10 +307,12 @@ hotOnly: true
295307
```
296308

297309
Usage via the CLI
298-
```
310+
311+
```bash
299312
webpack-dev-server --hot-only
300313
```
301314

315+
302316
## `devServer.https`
303317

304318
`boolean` `object`
@@ -322,24 +336,29 @@ https: {
322336
This object is passed straight to Node.js HTTPS module, so see the [HTTPS documentation](https://nodejs.org/api/https.html) for more information.
323337

324338
Usage via the CLI
325-
```
339+
340+
```bash
326341
webpack-dev-server --https
327342
```
328343

329344
To pass your own certificate via the CLI use the following options
330-
```
345+
346+
```bash
331347
webpack-dev-server --https --key /path/to/server.key --cert /path/to/server.crt --cacert /path/to/ca.pem
332348
```
333349

350+
334351
## `devServer.info` - CLI only
335352

336353
`boolean`
337354

338355
Output cli information. It is enabled by default.
339-
```
356+
357+
```bash
340358
webpack-dev-server --info=false
341359
```
342360

361+
343362
## `devServer.inline` - CLI only
344363

345364
`boolean`
@@ -353,7 +372,8 @@ inline: false
353372
```
354373

355374
Usage via the CLI
356-
```
375+
376+
```bash
357377
webpack-dev-server --inline=false
358378
```
359379

@@ -371,7 +391,8 @@ lazy: true
371391
```
372392

373393
Usage via the CLI
374-
```
394+
395+
```bash
375396
webpack-dev-server --lazy
376397
```
377398

@@ -390,6 +411,7 @@ With `noInfo` enabled, messages like the webpack bundle information that is show
390411
noInfo: true
391412
```
392413

414+
393415
## `devServer.open`
394416

395417
`boolean`
@@ -401,10 +423,12 @@ open: true
401423
```
402424

403425
Usage via the CLI
404-
```
426+
427+
```bash
405428
webpack-dev-server --open
406429
```
407430

431+
408432
## `devServer.openPage`
409433

410434
`string`
@@ -416,10 +440,12 @@ openPage: '/different/page'
416440
```
417441

418442
Usage via the CLI
419-
```
443+
444+
```bash
420445
webpack-dev-server --open-page "/different/page"
421446
```
422447

448+
423449
## `devServer.overlay`
424450

425451
`boolean` `object`
@@ -439,6 +465,7 @@ overlay: {
439465
}
440466
```
441467

468+
442469
## `devServer.pfx`
443470

444471
`string`
@@ -450,24 +477,29 @@ pfx: '/path/to/file.pfx'
450477
```
451478

452479
Usage via the CLI
453-
```
480+
481+
```bash
454482
webpack-dev-server --pfx /path/to/file.pfx
455483
```
456484

485+
457486
## `devServer.pfxPassphrase`
458487

459488
`string`
460489

461490
The passphrase to a SSL PFX file.
491+
462492
```js
463493
pfxPassphrase: 'passphrase'
464494
```
465495

466496
Usage via the CLI
467-
```
497+
498+
```bash
468499
webpack-dev-server --pfx-passphrase passphrase
469500
```
470501

502+
471503
## `devServer.port`
472504

473505
`number`
@@ -479,10 +511,12 @@ port: 8080
479511
```
480512

481513
Usage via the CLI
482-
```
514+
515+
```bash
483516
webpack-dev-server --port 8080
484517
```
485518

519+
486520
## `devServer.proxy`
487521

488522
`object`
@@ -549,7 +583,8 @@ proxy: {
549583
`boolean`
550584

551585
Output running progress to console.
552-
```
586+
587+
```bash
553588
webpack-dev-server --progress
554589
```
555590

@@ -567,7 +602,8 @@ public: "myapp.test:80"
567602
```
568603

569604
Usage via the CLI
570-
```
605+
606+
```bash
571607
webpack-dev-server --public myapp.test:80
572608
```
573609

@@ -612,10 +648,12 @@ quiet: true
612648
```
613649

614650
Usage via the CLI
615-
```
651+
652+
```bash
616653
webpack-dev-server --quiet
617654
```
618655

656+
619657
## `devServer.setup`
620658

621659
`function`
@@ -631,6 +669,7 @@ setup(app){
631669
}
632670
```
633671

672+
634673
## `devServer.socket`
635674

636675
`string`
@@ -642,7 +681,8 @@ socket: 'socket'
642681
```
643682

644683
Usage via the CLI
645-
```
684+
685+
```bash
646686
webpack-dev-server --socket socket
647687
```
648688

@@ -676,16 +716,18 @@ For more information, see the [**stats documentation**](/configuration/stats).
676716

677717
T> This option has no effect when used with `quiet` or `noInfo`.
678718

719+
679720
## `devServer.stdin` - CLI only
680721

681722
`boolean`
682723

683724
This option closes the server when stdin ends.
684725

685-
```
726+
```bash
686727
webpack-dev-server --stdin
687728
```
688729

730+
689731
## `devServer.useLocalIp`
690732

691733
`boolean`
@@ -697,10 +739,12 @@ useLocalIp: true
697739
```
698740

699741
Usage via the CLI
700-
```
742+
743+
```bash
701744
webpack-dev-server --useLocalIp
702745
```
703746

747+
704748
## `devServer.watchContentBase`
705749

706750
`boolean`
@@ -714,10 +758,12 @@ watchContentBase: true
714758
It is disabled by default.
715759

716760
Usage via the CLI
717-
```
761+
762+
```bash
718763
webpack-dev-server --watch-content-base
719764
```
720765

766+
721767
## `devServer.watchOptions` 🔑
722768

723769
`object`

0 commit comments

Comments
 (0)