Skip to content

Commit 6644713

Browse files
committed
docs: use --open
1 parent bd413c7 commit 6644713

File tree

19 files changed

+31
-31
lines changed

19 files changed

+31
-31
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 <url> --compress
13+
npx webpack serve --open --compress
1414
```
1515

1616
### What should happen

examples/cli/default/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
This example demonstrates how to use `webpack-dev-server`.
44

55
```console
6-
npx webpack serve --open-target
6+
npx webpack serve --open
77
```
88

99
To run your app using an alternative config, use:
1010

1111
```console
12-
npx webpack serve --open-target <url> --config alternative.config.js
12+
npx webpack serve --open --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 <url> --history-api-fallback
8+
npx webpack serve --open --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: 2 additions & 2 deletions
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 <url> --hot
11+
npx webpack serve --open --hot
1212
```
1313

1414
## What Should Happen
@@ -36,7 +36,7 @@ You should also see the text on the page itself change to match your edits in
3636
Enables Hot Module Replacement without page refresh as a fallback in case of build failures.
3737

3838
```console
39-
npx webpack serve --open-target --hot only
39+
npx webpack serve --open --hot only
4040
```
4141

4242
## 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 <url> --port 5000 --host 0.0.0.0
11+
npx webpack serve --open --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 <url> --port 5000 --host ::
19+
npx webpack serve --open --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 <url> --port 5000 --host local-ip
27+
npx webpack serve --open --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 <url> --port 5000 --host local-ipv4
35+
npx webpack serve --open --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 <url> --port 5000 --host local-ipv6
43+
npx webpack serve --open --port 5000 --host local-ipv6
4444
```
4545

4646
#### What Should Happen
@@ -56,7 +56,7 @@ npx webpack serve --open-target <url> --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 <url> --port 9000
59+
npx webpack serve --open --port 9000
6060
```
6161

6262
#### What Should Happen
@@ -69,7 +69,7 @@ npx webpack serve --open-target <url> --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 <url> --port auto
72+
npx webpack serve --open --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 <url> --https
10+
npx webpack serve --open --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 <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
24+
npx webpack serve --open --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 <url>
6+
npx webpack serve --open
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 <url>
4+
npx webpack serve --open
55
```
66

77
## What should happen

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 <url> --client-overlay
4+
npx webpack serve --open --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 default generated URL in different browsers --client-progress
4+
npx webpack serve --open --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 <url>
6+
npx webpack serve --static assets --open
77
```
88

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

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

3232
or via CLI only:
3333

3434
```console
35-
npx webpack serve --static assets --static css --open-target <url>
35+
npx webpack serve --static assets --static css --open
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 <url>
10+
npx webpack serve --web-socket-server sockjs --open
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 <url>
18+
npx webpack serve --web-socket-server ws --open
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 <url> --host 0.0.0.0 --client-web-socket-url ws://<insert-host>:8080
4+
npx webpack serve --open --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._

examples/general/config-array/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This example demonstrates using a `webpack` config containing an array of configs.
44

55
```console
6-
npx webpack serve --open-target
6+
npx webpack serve --open
77
```
88

99
## What Should Happen

examples/general/config-promise/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example demonstrates using `webpack-dev-server` with a `webpack` config tha
44
returns a `Promise`.
55

66
```console
7-
npx webpack serve --open-target
7+
npx webpack serve --open
88
```
99

1010
## What Should Happen

examples/general/proxy-advanced/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This example demonstrates a user case whereby the app proxies all urls that star
66
`http://jsonplaceholder.typicode.com/users`.
77

88
```console
9-
npx webpack serve --open-target
9+
npx webpack serve --open
1010
```
1111

1212
## What should happen

examples/general/proxy-hot-reload/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# General: Proxy Hot Reload
22

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

77
Enables hot reloading for proxy config. If function is provided instead of

examples/general/proxy-simple/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# General: Simple Proxy
22

33
```console
4-
npx webpack serve --open-target
4+
npx webpack serve --open
55
```
66

77
In `webpack.config.js` there is a very simple configuration for a proxy. Note that this only works when proxying to a direct ip address. See the proxy-advanced example if you want to proxy to a domain.

examples/general/universal-config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This example demonstrates using a `webpack` config containing a `target: web` config and `target:node` config.
44

55
```console
6-
npx webpack serve --open-target
6+
npx webpack serve --open
77
```
88

99
## What Should Happen

0 commit comments

Comments
 (0)