This commit is contained in:
liangjian
2026-01-27 16:32:15 +08:00
commit 836c61ac55
303 changed files with 34442 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import compressPlugin from 'vite-plugin-compression'
export const createCompress = (compress: any) => {
if (compress === 'brotli') {
return compressPlugin({
ext: '.br',
algorithm: 'brotliCompress',
})
}
if (compress === 'gzip' || compress) {
return compressPlugin({
ext: '.gz',
})
}
return []
}