Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
72 lines
1.4 KiB
Plaintext
72 lines
1.4 KiB
Plaintext
import { Plugin } from 'vite';
|
|
import { PngOptions, JpegOptions, TiffOptions, GifOptions, WebpOptions, AvifOptions } from 'sharp';
|
|
import { Config as SVGOConfig } from 'svgo';
|
|
interface Options {
|
|
/**
|
|
* test to match files against
|
|
*/
|
|
test?: RegExp;
|
|
/**
|
|
* files to include
|
|
*/
|
|
include?: RegExp | string | string[];
|
|
/**
|
|
* files to exclude
|
|
*/
|
|
exclude?: RegExp | string | string[];
|
|
/**
|
|
* include assets in public dir or not
|
|
*/
|
|
includePublic?: boolean;
|
|
/**
|
|
* display logs using colors or not
|
|
*/
|
|
ansiColors?: boolean;
|
|
/**
|
|
* log stats to the terminal or not
|
|
*/
|
|
logStats?: boolean;
|
|
/**
|
|
* svgo opts
|
|
*/
|
|
svg?: SVGOConfig;
|
|
/**
|
|
* sharp opts for png
|
|
*/
|
|
png?: PngOptions;
|
|
/**
|
|
* sharp opts for jpeg
|
|
*/
|
|
jpeg?: JpegOptions;
|
|
/**
|
|
* sharp opts for jpg
|
|
*/
|
|
jpg?: JpegOptions;
|
|
/**
|
|
* sharp opts for tiff
|
|
*/
|
|
tiff?: TiffOptions;
|
|
/**
|
|
* sharp opts for gif
|
|
*/
|
|
gif?: GifOptions;
|
|
/**
|
|
* sharp opts for webp
|
|
*/
|
|
webp?: WebpOptions;
|
|
/**
|
|
* sharp opts for avif
|
|
*/
|
|
avif?: AvifOptions;
|
|
/**
|
|
* cache optimized images or not
|
|
*/
|
|
cache?: boolean;
|
|
/**
|
|
* path to the cache directory
|
|
*/
|
|
cacheLocation?: string;
|
|
}
|
|
declare function ViteImageOptimizer(optionsParam?: Options): Plugin;
|
|
export { ViteImageOptimizer };
|