mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2025-08-29 09:30:36 +00:00
新增使用Gzip解压缩静态文件地址
This commit is contained in:
@@ -8,4 +8,4 @@ VITE_APP_ENV = 'production'
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip,brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
@@ -8,4 +8,4 @@ VITE_APP_ENV = 'staging'
|
||||
VITE_APP_BASE_API = '/stage-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip,brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
@@ -5,6 +5,7 @@ export default function createCompression(env) {
|
||||
const compressList = VITE_BUILD_COMPRESS.split(',')
|
||||
const plugin = []
|
||||
if (compressList.includes('gzip')) {
|
||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||
plugin.push(
|
||||
compression({
|
||||
ext: '.gz',
|
||||
|
Reference in New Issue
Block a user