You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for Zstandard compression algorithm (#693)
* feat: add support for Zstandard compression algorithm
* fix: ensure Zstandard compression is only used if supported
* feat: update documentation to include Zstandard compression support
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,9 @@ _Note: Gaps between patch versions are faulty, broken or test releases._
12
12
13
13
## UNRELEASED
14
14
15
+
***New Feature**
16
+
* Add support for Zstandard compression ([#693](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/693) by [@bjohansebas](https://github.com/bjohansebas))
17
+
15
18
***Internal**
16
19
* Update `sirv` dependency ([#692](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/692) by [@bjohansebas](https://github.com/bjohansebas))
17
20
* Update `ws` dependency ([#691](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/691) by [@bjohansebas](https://github.com/bjohansebas))
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This module will help you:
45
45
4. Optimize it!
46
46
47
47
And the best thing is it supports minified bundles! It parses them to get real size of bundled modules.
48
-
And it also shows their gzippedor Brotli sizes!
48
+
And it also shows their gzipped, Brotli, or Zstandard sizes!
49
49
50
50
<h2align="center">Options (for plugin)</h2>
51
51
@@ -62,7 +62,7 @@ new BundleAnalyzerPlugin(options?: object)
62
62
|**`reportFilename`**|`{String}`|Default: `report.html`. Path to bundle report file that will be generated in `static` mode. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config).|
63
63
|**`reportTitle`**|`{String\|function}`|Default: function that returns pretty printed current date and time. Content of the HTML `title` element; or a function of the form `() => string` that provides the content.|
64
64
|**`defaultSizes`**|One of: `stat`, `parsed`, `gzip`, `brotli`|Default: `parsed`. Module sizes to show in report by default. [Size definitions](#size-definitions) section describes what these values mean.|
65
-
|**`compressionAlgorithm`**|One of: `gzip`, `brotli`|Default: `gzip`. Compression type used to calculate the compressed module sizes.|
65
+
|**`compressionAlgorithm`**|One of: `gzip`, `brotli`, `zstd`|Default: `gzip`. Compression type used to calculate the compressed module sizes.|
66
66
|**`openAnalyzer`**|`{Boolean}`|Default: `true`. Automatically open report in default browser.|
67
67
|**`generateStatsFile`**|`{Boolean}`|Default: `false`. If `true`, webpack stats JSON file will be generated in bundle output directory|
68
68
|**`statsFilename`**|`{String}`|Default: `stats.json`. Name of webpack stats JSON file that will be generated if `generateStatsFile` is `true`. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config).|
@@ -122,9 +122,9 @@ Directory containing all generated bundles.
122
122
-r, --report <file> Path to bundle report file that will be generated in `static` mode. (default: report.html)
123
123
-t, --title <title> String to use in title element of html report. (default: pretty printed current date)
124
124
-s, --default-sizes <type> Module sizes to show in treemap by default.
125
-
Possible values: stat, parsed, gzip, brotli (default: parsed)
125
+
Possible values: stat, parsed, gzip, brotli, zstd (default: parsed)
126
126
--compression-algorithm <type> Compression algorithm that will be used to calculate the compressed module sizes.
127
-
Possible values: gzip, brotli (default: gzip)
127
+
Possible values: gzip, brotli, zstd (default: gzip)
128
128
-O, --no-open Don't open report in default browser automatically.
129
129
-e, --exclude <regexp> Assets that should be excluded from the report.
130
130
Can be specified multiple times.
@@ -158,6 +158,10 @@ This is the size of running the parsed bundles/modules through gzip compression.
158
158
159
159
This is the size of running the parsed bundles/modules through Brotli compression.
160
160
161
+
### `zstd`
162
+
163
+
This is the size of running the parsed bundles/modules through Zstandard compression. (Node.js 22.15.0+ is required for this feature)
164
+
161
165
<h2align="center">Selecting Which Chunks to Display</h2>
162
166
163
167
When opened, the report displays all of the Webpack chunks for your project. It's possible to filter to a more specific list of chunks by using the sidebar or the chunk context menu.
0 commit comments