mirror of
https://github.com/wmn1525/grasscutterTools.git
synced 2024-11-25 01:19:38 +00:00
17 lines
393 B
TypeScript
17 lines
393 B
TypeScript
/**
|
|
* @name ConfigCompressPlugin
|
|
* @description 开启.gz压缩
|
|
*/
|
|
import viteCompression from 'vite-plugin-compression';
|
|
import { COMPRESSION } from '../../constant';
|
|
|
|
export const ConfigCompressPlugin = () => {
|
|
if (COMPRESSION) {
|
|
return viteCompression({
|
|
ext: '.gz',
|
|
verbose: true,
|
|
deleteOriginFile: false,
|
|
})
|
|
}
|
|
return [];
|
|
} |