Files
NapCatQQ/.pnpm-store/v3/files/01/2f64217993cf722acde6c93671510f3eab09f7f6d6938969b1dba6c53581e1825531ca1cc8a3db1ebd98472e6c21a6f4ad9a1c6b9660cb3c0fba9e7ac2eaeb
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

55 lines
1.4 KiB
Plaintext

import { Plugin } from 'vite';
import { ZlibOptions, BrotliOptions } from 'zlib';
declare type Algorithm = 'gzip' | 'brotliCompress' | 'deflate' | 'deflateRaw';
declare type CompressionOptions = Partial<ZlibOptions> | Partial<BrotliOptions>;
interface VitePluginCompression {
/**
* Log compressed files and their compression ratios.
* @default: true
*/
verbose?: boolean;
/**
* Minimum file size before compression is used.
* @default 1025
*/
threshold?: number;
/**
* Filter files that do not need to be compressed
* @default /\.(js|mjs|json|css|html)$/i
*/
filter?: RegExp | ((file: string) => boolean);
/**
* Whether to enable compression
* @default: false
*/
disable?: boolean;
/**
* Compression algorithm
* @default gzip
*/
algorithm?: Algorithm;
/**
* File format after compression
* @default .gz
*/
ext?: string;
/**
* Compression Options
*/
compressionOptions?: CompressionOptions;
/**
* Delete the corresponding source file after compressing the file
* @default: false
*/
deleteOriginFile?: boolean;
/**
* success callback after completed
*/
success?: () => void;
}
declare function export_default(options?: VitePluginCompression): Plugin;
export { export_default as default };