mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-24 04:10:20 +08:00
13 lines
296 B
TypeScript
13 lines
296 B
TypeScript
import gzipPlugin from 'rollup-plugin-gzip';
|
|
import { isBuildGzip } from '../../utils';
|
|
import { Plugin } from 'vite';
|
|
export function configGzipPlugin(isBuild: boolean): Plugin | Plugin[] {
|
|
const useGzip = isBuild && isBuildGzip;
|
|
|
|
if (useGzip) {
|
|
return gzipPlugin();
|
|
}
|
|
|
|
return [];
|
|
}
|