Vite Zipper (v0.3.15) is a Vite plugin that zips build outputs into a single archive file, streamlining deployment workflows. It supports custom output filenames, and TypeScript types are included. Requires Node.js >=18 and Vite ^7.0.0 as a peer dependency. Compared to alternatives like 'vite-plugin-zip-pack' or 'vite-plugin-zip-dist', it offers a simpler API with out-of-the-box TypeScript support and active maintenance on GitHub. Released under the MIT license, it follows a monthly release cadence.
npm install vite-zipperVerified import paths — ran on the pinned version, not inferred.
Shows how to configure vite-zipper in vite.config.ts to produce a zip archive of the build output.
Use import syntax and ensure Node.js >=18. For legacy projects, upgrade Node or use dynamic import().
Upgrade to v0.3.15 and update option names: old 'outputDir' is now 'outputPath', old 'fileName' is now 'archiveName'.
If you need to zip during dev, consider using a different approach or triggering a build on demand.
Ensure your build process cleans the output directory or uses unique archive names to avoid accidental overwrites.
Change to import statement: import { viteZipper } from 'vite-zipper'; or use dynamic import: const { viteZipper } = await import('vite-zipper');Ensure you are using the named export: import { viteZipper } from 'vite-zipper'; or the default export: import viteZipper from 'vite-zipper';Upgrade Vite to version 7.x: npm install vite@7