UNPKG

vite-plugin-fflate-zip

Version:

Vite plugin for packaging build folder into zip file via fflate

36 lines (33 loc) 736 B
import { PluginOption } from 'vite'; interface Options { /** * Input Directory * @default `dist` */ inDir: string; /** * Output Directory * @default `dist-zip` */ outDir: string; /** * Zip Archive Name. * @default `${pkg.name}-${pkg.version}.zip` */ zipName: string; /** * Files to be excluded */ excludedFiles: string[]; /** * After creating the zip file execute */ onArchived: () => void; /** * Execute when an error occurs * @param err Error message */ onError: (err: Error) => void; } declare function fflateZip(options?: Partial<Options>): PluginOption; export { type Options, fflateZip as default };