Skip to content

Commit

Permalink
docs: edited readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
info-arnav committed Apr 13, 2024
1 parent 87b033e commit 72dc78d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Expand Up @@ -96,7 +96,7 @@ webpack-bundle-analyzer bundle/output/path/stats.json

```bash
webpack-bundle-analyzer <bundleStatsFile> [bundleDir] [options]
webpack build --analyze --analyze-[options]
webpack build --analyze [cliOptions]
```

Arguments are documented below:
Expand Down Expand Up @@ -131,6 +131,28 @@ Directory containing all generated bundles.
-h, --help output usage information
```

### `cliOptions`

```
--analyze-version output the version number
--analyze-mode <mode> Analyzer mode. Should be `server`, `static` or `json`.
In `server` mode analyzer will start HTTP server to show bundle report.
In `static` mode single HTML file with bundle report will be generated.
In `json` mode single JSON file with bundle report will be generated. (default: server)
--analyze-host <host> Host that will be used in `server` mode to start HTTP server. (default: 127.0.0.1)
--analyze-port <n> Port that will be used in `server` mode to start HTTP server. Should be a number or `auto` (default: 8888)
--analyze-report <file> Path to bundle report file that will be generated in `static` mode. (default: report.html)
--analyze-title <title> String to use in title element of html report. (default: pretty printed current date)
--analyze-default-sizes <type> Module sizes to show in treemap by default.
Possible values: stat, parsed, gzip (default: parsed)
--analyze-no-open Don't open report in default browser automatically.
--analyze-exclude <regexp> Assets that should be excluded from the report.
Can be specified multiple times.
--analyze-log-level <level> Log level.
Possible values: debug, info, warn, error, silent (default: info)
--analyze-help output usage information
```

<h2 align="center" id="size-definitions">Size definitions</h2>

webpack-bundle-analyzer reports three values for sizes. `defaultSizes` can be used to control which of these is shown by default. The different reported sizes are:
Expand Down

0 comments on commit 72dc78d

Please sign in to comment.