Commit f7268e7ce44ccf3c63b8cbe62fa6ce1ec757360b

Authored by YunaiV
1 parent fe552aed

v3.8.1 新增使用Gzip解压缩静态文件地址

Showing 1 changed file with 1 additions and 1 deletions
yudao-ui-admin/vue.config.js
... ... @@ -61,11 +61,11 @@ module.exports = {
61 61 }
62 62 },
63 63 plugins: [
  64 + // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
64 65 new CompressionPlugin({
65 66 test: /\.(js|css|html)?$/i, // 压缩文件格式
66 67 filename: '[path].gz[query]', // 压缩后的文件名
67 68 algorithm: 'gzip', // 使用gzip压缩
68   - threshold: 10240, // 对超过10K的数据压缩
69 69 minRatio: 0.8 // 压缩率小于1才会压缩
70 70 })
71 71 ],
... ...