mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-05 19:41:59 +08:00
11 lines
331 B
TypeScript
11 lines
331 B
TypeScript
import viteCompression from 'vite-plugin-compression'; //https://github.com/vbenjs/vite-plugin-compression/blob/main/README.zh_CN.md
|
|
|
|
export default (viteEnv) => {
|
|
// 默认使用gzip压缩
|
|
const { VITE_COMPRESS_TYPE = 'gzip' } = viteEnv;
|
|
|
|
return viteCompression({
|
|
algorithm: VITE_COMPRESS_TYPE, // 压缩算法
|
|
});
|
|
};
|