vitepress-plugin-compression
v0.1.4
Published
VitePress plugin for packing build folder.
Downloads
6
Maintainers
Readme
VitePress-Plugin-Compression
VitePress plugin for packing build folder.Official Docs.
English | 简体中文
Install
# npm
npm i -D vitepress-plugin-compression
# yarn
yarn add -D vitepress-plugin-compression
# pnpm
pnpm add -D vitepress-plugin-compression
Usage
// .vitepress/config.js
import { defineConfig } from "vitepress";
import compression from "vitepress-plugin-compression";
export default defineConfig({
async buildEnd() {
compression();
},
});
Options
export interface Options {
/**
* Input Directory
* @default `dist`
*/
inDir?: string;
/**
* Output Directory
* @default `dist`
*/
outDir?: string;
/**
* Archive Name
* @default `dist`
*/
outFileName?: string;
/**
* Archive Type
* @default `zip`
*/
type?: "7z" | "zip" | "lzma" | "cab" | "gzip" | "bzip2" | "tar";
}
License
MIT, see the license file