Skip to content

Commit 50f200a

Browse files
committed
docs: update
1 parent c0ad1b7 commit 50f200a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

examples/cli/compression/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,38 @@
33
Website gzip compression makes it possible to reduce the file size of a file
44
to roughly 30% of its original size before the files are sent to the browser.
55

6+
It is enabled by default.
7+
8+
## `--compress`
9+
610
To run this example, run this command in your console or terminal:
711

812
```console
913
npm run webpack-dev-server -- --open --compress
1014
```
1115

12-
## What should happen
16+
### What should happen
1317

1418
1. The script should open `http://localhost:8080/`.
1519
2. Files being sent to the browser from the `webpack` bundle should be gzipped.
1620
3. Open the console in your browser's devtools and select the _Network_ tab.
1721
4. Find `bundle.js`. The response headers should contain `Content-Encoding: gzip`.
1822

23+
## `--no-compress`
24+
25+
To run this example, run this command in your console or terminal:
26+
27+
```console
28+
npm run webpack-dev-server -- --open --no-compress
29+
```
30+
31+
### What should happen
32+
33+
1. The script should open `http://localhost:8080/`.
34+
2. Files being sent to the browser from the `webpack` bundle should be gzipped.
35+
3. Open the console in your browser's devtools and select the _Network_ tab.
36+
4. Find `bundle.js`. The response headers should not contain `Content-Encoding: gzip`.
37+
1938
## Notes
2039

2140
Some browsers, such as Chrome, won't show the `Content-Encoding: gzip` within

0 commit comments

Comments
 (0)