mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #49467 update(compression-webpack-plugin): deleteOriginalAssets by @peterblazejewicz
Update type for `deleteOriginalAssets` option: https://github.com/webpack-contrib/compression-webpack-plugin/compare/v6.0.5...v6.1.0 Thanks!
This commit is contained in:
committed by
GitHub
parent
e57425f118
commit
9bc42ea5d4
@@ -18,7 +18,7 @@ const config: Configuration = {
|
||||
minRatio: 0.8,
|
||||
test: /\.js$|\.html$/,
|
||||
threshold: 10240,
|
||||
deleteOriginalAssets: true
|
||||
deleteOriginalAssets: true,
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
filename: pathData => {
|
||||
@@ -27,8 +27,9 @@ const config: Configuration = {
|
||||
pathData.query; // $ExpectType string
|
||||
return `${pathData.path}.gz${pathData.query}`;
|
||||
},
|
||||
})
|
||||
]
|
||||
deleteOriginalAssets: 'keep-source-map',
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
const configDefaultAlgo = new CompressionPlugin({
|
||||
@@ -45,10 +46,10 @@ const zlib: Configuration = {
|
||||
compressionOptions: {
|
||||
flush: 5,
|
||||
windowBits: 20,
|
||||
level: 7
|
||||
}
|
||||
})
|
||||
]
|
||||
level: 7,
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
const badZlib: Configuration = {
|
||||
|
||||
3
types/compression-webpack-plugin/index.d.ts
vendored
3
types/compression-webpack-plugin/index.d.ts
vendored
@@ -52,9 +52,10 @@ declare namespace CompressionPlugin {
|
||||
*/
|
||||
cache?: boolean | string;
|
||||
/**
|
||||
* Whether to delete the original assets or not
|
||||
* @default false
|
||||
*/
|
||||
deleteOriginalAssets?: boolean;
|
||||
deleteOriginalAssets?: boolean | 'keep-source-map';
|
||||
/**
|
||||
* Exclude all assets matching any of these conditions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user