vite-plugin-xk-compression
v0.0.3
Published
```sh npm i vite-plugin-xk-compression -D ```
Downloads
3
Readme
Using
npm i vite-plugin-xk-compression -D/* vite.config.ts */
import { viteCompression, type ViteCompress} from "vite-plugin-xk-compression";
export default defineConfig({
plugins: [
viteCompression('gzip') // -- type: ViteCompress
],
});Type
type ViteCompress = "none" | "brotli" | "gzip" | "both" | "brotli-clear" | "gzip-clear" | "both-clear";
/**
* none: 不压缩
* gzip: gz 压缩
* brotli: br 压缩
* both: gz + br 压缩
*
* + ↓ 下面同理,不过下面的不会保留源文件
*
* brotli-clear
* gzip-clear
* both-clear
*/