mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 05:27:39 +08:00
优化构建
This commit is contained in:
parent
371ba26f51
commit
77353ec8c6
@ -7,19 +7,17 @@ export default function createCompression(env) {
|
||||
if (compressList.includes('gzip')) {
|
||||
plugin.push(
|
||||
compression({
|
||||
filter: /\.(js|mjs|json|css)$/i,
|
||||
ext: '.gz',
|
||||
deleteOriginFile: true,
|
||||
deleteOriginFile: false,
|
||||
}),
|
||||
)
|
||||
}
|
||||
if (compressList.includes('brotli')) {
|
||||
plugin.push(
|
||||
compression({
|
||||
filter: /\.(js|mjs|json|css)$/i,
|
||||
ext: '.br',
|
||||
algorithm: 'brotliCompress',
|
||||
deleteOriginFile: true,
|
||||
deleteOriginFile: false,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user