compression-webpack-plugin: asset -> filename

This commit is contained in:
Rhys van der Waerden
2018-11-19 11:56:16 +11:00
parent ceee1391c7
commit 3fc7e12463
2 changed files with 5 additions and 2 deletions
@@ -6,7 +6,7 @@ new CompressionPlugin();
const config: Configuration = {
plugins: [
new CompressionPlugin({
asset: "[path].gz[query]",
filename: "[path].gz[query]",
algorithm: "gzip",
cache: true,
test: /\.js$|\.html$/,
@@ -20,6 +20,9 @@ const configDefaultAlgo = new CompressionPlugin({
compressionOptions: { level: 7 }
});
// $ExpectError
new CompressionPlugin({ asset: "[path].gz[query]" });
const zlib: Configuration = {
plugins: [
new CompressionPlugin({
+1 -1
View File
@@ -21,7 +21,7 @@ declare namespace CompressionPlugin {
type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip';
interface BaseOptions {
asset?: string;
filename?: string;
cache?: boolean | string;
test?: RegExp | RegExp[];
regExp?: RegExp | RegExp[];