@@ -66,7 +66,7 @@ Finally, run `webpack` using the method you normally use (e.g., via CLI or an np
66
66
Type:
67
67
68
68
``` ts
69
- type test = string | RegExp | Array < string | RegExp > ;
69
+ type test = string | RegExp | ( string | RegExp )[] ;
70
70
```
71
71
72
72
Default: ` undefined `
@@ -90,7 +90,7 @@ module.exports = {
90
90
Type:
91
91
92
92
``` ts
93
- type include = string | RegExp | Array < string | RegExp > ;
93
+ type include = string | RegExp | ( string | RegExp )[] ;
94
94
```
95
95
96
96
Default: ` undefined `
@@ -114,7 +114,7 @@ module.exports = {
114
114
Type:
115
115
116
116
``` ts
117
- type exclude = string | RegExp | Array < string | RegExp > ;
117
+ type exclude = string | RegExp | ( string | RegExp )[] ;
118
118
```
119
119
120
120
Default: ` undefined `
@@ -164,7 +164,7 @@ type algorithm =
164
164
[Symbol .toPrimitive ](hint : " string" ): string ;
165
165
},
166
166
) => void ,
167
- ) => any );
167
+ ) => void );
168
168
```
169
169
170
170
Defines the compression algorithm or function to use. Defaults to ` gzip ` .
@@ -212,7 +212,7 @@ module.exports = {
212
212
Type:
213
213
214
214
``` ts
215
- type compressionOptions = {
215
+ interface compressionOptions {
216
216
flush? : number ;
217
217
finishFlush? : number ;
218
218
chunkSize? : number ;
@@ -223,7 +223,7 @@ type compressionOptions = {
223
223
dictionary? : Buffer | TypedArray | DataView | ArrayBuffer ;
224
224
info? : boolean ;
225
225
maxOutputLength? : number ;
226
- };
226
+ }
227
227
```
228
228
229
229
Default: ` { level: 9 } `
@@ -401,10 +401,9 @@ Example:
401
401
module .exports = {
402
402
plugins: [
403
403
new CompressionPlugin ({
404
- deleteOriginalAssets : (assetName ) => {
404
+ deleteOriginalAssets : (assetName ) =>
405
405
// Delete all assets except images
406
- return ! assetName .endsWith (" .png" ) && ! assetName .endsWith (" .jpg" );
407
- },
406
+ ! assetName .endsWith (" .png" ) && ! assetName .endsWith (" .jpg" ),
408
407
}),
409
408
],
410
409
};
@@ -500,7 +499,7 @@ You can take advantage of this built-in support for Brotli in Node 10.16.0 and l
500
499
** webpack.config.js**
501
500
502
501
``` js
503
- const zlib = require (" zlib" );
502
+ const zlib = require (" node: zlib" );
504
503
505
504
module .exports = {
506
505
plugins: [
@@ -535,7 +534,7 @@ You can take advantage of this built-in support for zstd in Node 22.15.0 and lat
535
534
** webpack.config.js**
536
535
537
536
``` js
538
- const zlib = require (" zlib" );
537
+ const zlib = require (" node: zlib" );
539
538
540
539
module .exports = {
541
540
plugins: [
@@ -563,7 +562,7 @@ You can find all Zstandard's options in [the relevant part of the zlib module do
563
562
** webpack.config.js**
564
563
565
564
``` js
566
- const zlib = require (" zlib" );
565
+ const zlib = require (" node: zlib" );
567
566
568
567
module .exports = {
569
568
plugins: [
0 commit comments