From 68a19d55deddec5c34ee2f81f49b9407b184a6ab Mon Sep 17 00:00:00 2001 From: Pan Date: Wed, 9 Jan 2019 14:53:36 +0800 Subject: [PATCH] fix[chore]: fix error when enable gzip --- build/webpack.prod.conf.js | 1 - package.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 946a134a..4f84e0c6 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -150,7 +150,6 @@ if (config.build.productionGzip) { webpackConfig.plugins.push( new CompressionWebpackPlugin({ - asset: '[path].gz[query]', algorithm: 'gzip', test: new RegExp( '\\.(' + config.build.productionGzipExtensions.join('|') + ')$' diff --git a/package.json b/package.json index 8ba9aadf..e5b0b9ec 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "babel-preset-env": "1.7.0", "babel-preset-stage-2": "6.24.1", "chalk": "2.4.1", + "compression-webpack-plugin": "2.0.0", "copy-webpack-plugin": "4.5.2", "cross-env": "5.2.0", "css-loader": "1.0.0",