diff --git a/vue.config.js b/vue.config.js index f571afca..8e65033c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -74,14 +74,14 @@ module.exports = { '@': resolve('src') } }, - // plugins: [ - // new CompressionPlugin({ - // test: /\.(js|css|html)?$/i, // 压缩文件格式 - // filename: '[path].gz[query]', // 压缩后的文件名 - // algorithm: 'gzip', // 使用gzip压缩 - // minRatio: 0.8 // 压缩率小于1才会压缩 - // }) - // ], + plugins: [ + new CompressionPlugin({ + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: '[path].gz[query]', // 压缩后的文件名 + algorithm: 'gzip', // 使用gzip压缩 + minRatio: 0.8 // 压缩率小于1才会压缩 + }) + ], }, chainWebpack(config) { config.plugins.delete('preload') // TODO: need test