Skip to content

Commit bd413c7

Browse files
authored
docs: update examples (#3505)
1 parent 67aaaf7 commit bd413c7

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

examples/cli/compression/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It is enabled by default.
1010
To run this example, run this command in your console or terminal:
1111

1212
```console
13-
npx webpack serve --open-target --compress
13+
npx webpack serve --open-target <url> --compress
1414
```
1515

1616
### What should happen

examples/cli/default/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ npx webpack serve --open-target
99
To run your app using an alternative config, use:
1010

1111
```console
12-
npx webpack serve --open-target --config alternative.config.js
12+
npx webpack serve --open-target <url> --config alternative.config.js
1313
```
1414

1515
## What Should Happen

examples/cli/history-api-fallback/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ support in `webpack-dev-server`, effectively asking the server to fallback to
55
`index.html` in the event that a requested resource cannot be found.
66

77
```shell
8-
npx webpack serve --open-target --history-api-fallback
8+
npx webpack serve --open-target <url> --history-api-fallback
99
```
1010

1111
_Note: some URLs don't work by default. For example; if the url contains a dot.

examples/cli/hmr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ application is running, without a full reload of the page.
88
To run this example, run this command in your console or terminal:
99

1010
```console
11-
npx webpack serve --open-target --hot
11+
npx webpack serve --open-target <url> --hot
1212
```
1313

1414
## What Should Happen

examples/cli/host-and-port/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,39 @@ will run. The `host` and `port` options allow for that.
88
### IPv4
99

1010
```console
11-
npx webpack serve --open-target --port 5000 --host 0.0.0.0
11+
npx webpack serve --open-target <url> --port 5000 --host 0.0.0.0
1212
```
1313

1414
### IPv6
1515

1616
_This also works with IPv6_
1717

1818
```console
19-
npx webpack serve --open-target --port 5000 --host ::
19+
npx webpack serve --open-target <url> --port 5000 --host ::
2020
```
2121

2222
### local-ip
2323

2424
Specifying `local-ip` as `host` will try to resolve the `host` option as your local `IPv4` address if available, if `IPv4` is not available it will try to resolve your local `IPv6` address.
2525

2626
```console
27-
npx webpack serve --open-target --port 5000 --host local-ip
27+
npx webpack serve --open-target <url> --port 5000 --host local-ip
2828
```
2929

3030
### local-ipv4
3131

3232
Specifying `local-ipv4` as `host` will try to resolve the `host` option as your local `IPv4` address.
3333

3434
```console
35-
npx webpack serve --open-target --port 5000 --host local-ipv4
35+
npx webpack serve --open-target <url> --port 5000 --host local-ipv4
3636
```
3737

3838
### local-ipv6
3939

4040
Specifying `local-ipv6` as `host` will try to resolve the `host` option as your local `IPv6` address.
4141

4242
```console
43-
npx webpack serve --open-target --port 5000 --host local-ipv6
43+
npx webpack serve --open-target <url> --port 5000 --host local-ipv6
4444
```
4545

4646
#### What Should Happen
@@ -56,7 +56,7 @@ npx webpack serve --open-target --port 5000 --host local-ipv6
5656
Tell the server to connect to a specific port with the following:
5757

5858
```console
59-
npx webpack serve --open-target --port 9000
59+
npx webpack serve --open-target <url> --port 9000
6060
```
6161

6262
#### What Should Happen
@@ -69,7 +69,7 @@ npx webpack serve --open-target --port 9000
6969
Specifying `auto` as `port` will try to connect the server to the default port `8080` and if not available it will automatically search for another free port.
7070

7171
```console
72-
npx webpack serve --open-target --port auto
72+
npx webpack serve --open-target <url> --port auto
7373
```
7474

7575
#### What Should Happen

examples/cli/https/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You may choose to wish to run `webpack-dev-server` on `https`.
77
Use HTTPS protocol.
88

99
```console
10-
npx webpack serve --open-target --https
10+
npx webpack serve --open-target <url> --https
1111
```
1212

1313
## https options
@@ -21,7 +21,7 @@ Customize `https` configuration with the following options:
2121
- `--https-passphrase`: Passphrase for a pfx file.
2222

2323
```console
24-
npx webpack serve --open-target --https-key ./ssl/server.key --https-pfx ./ssl/server.pfx --https-cert ./ssl/server.crt --https-cacert ./ssl/ca.pem --https-passphrase webpack-dev-server
24+
npx webpack serve --open-target <url> --https-key ./ssl/server.key --https-pfx ./ssl/server.pfx --https-cert ./ssl/server.crt --https-cacert ./ssl/ca.pem --https-passphrase webpack-dev-server
2525
```
2626

2727
## What Should Happen

examples/cli/multi-compiler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
`webpack-dev-server` should be able to compile multiple webpack configs.
44

55
```shell
6-
npx webpack serve --open-target
6+
npx webpack serve --open-target <url>
77
```
88

99
## What Should Happen

examples/cli/node-false/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CLI: Webpack `node` Option
22

33
```shell
4-
npx webpack serve --open-target
4+
npx webpack serve --open-target <url>
55
```
66

77
## What should happen

examples/cli/open-target/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# CLI: Open Target Option
22

3-
Open browser:
3+
Open default generated URL in browser:
44

55
```
6-
npx webpack serve --open-target
6+
npx webpack serve --open-target <url>
77
```
88

99
Open specific page in browser:

examples/cli/overlay/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CLI: --client-overlay option
22

33
```shell
4-
npx webpack serve --open-target --client-overlay
4+
npx webpack serve --open-target <url> --client-overlay
55
```
66

77
## What Should Happen

examples/cli/progress/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CLI: Progress Option
22

33
```shell
4-
npx webpack serve --open-target --client-progress
4+
npx webpack serve --open-target default generated URL in different browsers --client-progress
55
```
66

77
## What Should Happen

examples/cli/watch-static/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Watching a single directory
44

55
```console
6-
npx webpack serve --static assets --open-target
6+
npx webpack serve --static assets --open-target <url>
77
```
88

99
### What Should Happen
@@ -26,13 +26,13 @@ module.exports = {
2626
```
2727

2828
```console
29-
npx webpack serve --open-target
29+
npx webpack serve --open-target <url>
3030
```
3131

3232
or via CLI only:
3333

3434
```console
35-
npx webpack serve --static assets --static css --open-target
35+
npx webpack serve --static assets --static css --open-target <url>
3636
```
3737

3838
### What Should Happen

examples/cli/web-server-socket/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ To create a custom server implementation.
77
This mode uses [SockJS-node](https://github.com/sockjs/sockjs-node) as a server.
88

99
```console
10-
npx webpack serve --web-socket-server sockjs --open-target
10+
npx webpack serve --web-socket-server sockjs --open-target <url>
1111
```
1212

1313
## ws
1414

1515
This mode uses [ws](https://github.com/websockets/ws) as a server.
1616

1717
```console
18-
npx webpack serve --web-socket-server ws --open-target
18+
npx webpack serve --web-socket-server ws --open-target <url>
1919
```
2020

2121
### What Should Happen

examples/cli/web-socket-url-cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CLI: Web Socket URL
22

33
```console
4-
npx webpack serve --open-target --host 0.0.0.0 --client-web-socket-url ws://<insert-host>:8080
4+
npx webpack serve --open-target <url> --host 0.0.0.0 --client-web-socket-url ws://<insert-host>:8080
55
```
66

77
_NOTE: replace `<insert-host>` with your local IP Address._

0 commit comments

Comments
 (0)