Registry / devops / vite-zipper

vite-zipper

JSON →
library0.3.15jsnpmunverified

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-zipper
INSTALL
IMPORT
SIG · VITE-ZIPPER
V
vite-zipper
devopsjavascriptv0.3.15
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

viteZipper
import { viteZipper } from 'vite-zipper'
const viteZipper = require('vite-zipper')
ESM-only package; CommonJS require will throw. Named export from v0.3.0+.
PluginOptions
import type { PluginOptions } from 'vite-zipper'
import { PluginOptions } from 'vite-zipper'
TypeScript only; PluginOptions is a type, not a runtime value. Use import type to avoid errors in strict mode.
default
import viteZipper from 'vite-zipper'
import { default as viteZipper } from 'vite-zipper'
Default export also available, but named export is preferred. Using default with named destructure is unnecessary.

Shows how to configure vite-zipper in vite.config.ts to produce a zip archive of the build output.

// vite.config.ts import { defineConfig } from 'vite'; import { viteZipper } from 'vite-zipper'; export default defineConfig({ plugins: [ viteZipper({ outputPath: 'dist', archiveName: 'my-site.zip' }), ], }); // After running 'vite build', outputs are zipped into 'dist/my-site.zip'.
Debug
Known issues
breakingPackage is ESM-only and requires Node.js >=18. Using require() will throw a runtime error.
fix
Use import syntax and ensure Node.js >=18. For legacy projects, upgrade Node or use dynamic import().
affects: >=0.3.0
deprecatedIn version 0.2.x, the plugin exported a default function under 'vite-zipper' but with different option names.
fix
Upgrade to v0.3.15 and update option names: old 'outputDir' is now 'outputPath', old 'fileName' is now 'archiveName'.
affects: >=0.2.0 <0.3.0
gotchaThe plugin only runs during production builds; it does not affect the dev server or watch mode.
fix
If you need to zip during dev, consider using a different approach or triggering a build on demand.
affects: >=0.1.0
gotchaIf the output archive already exists, it will be overwritten without warning. There is no conflict detection.
fix
Ensure your build process cleans the output directory or uses unique archive names to avoid accidental overwrites.
affects: >=0.3.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Using CommonJS require() on an ESM-only package.
fix
Change to import statement: import { viteZipper } from 'vite-zipper'; or use dynamic import: const { viteZipper } = await import('vite-zipper');
TypeError: viteZipper is not a function
Importing the plugin incorrectly, e.g., using default import with the wrong name, or importing a non-existent export.
fix
Ensure you are using the named export: import { viteZipper } from 'vite-zipper'; or the default export: import viteZipper from 'vite-zipper';
Error: The plugin 'vite-zipper' requires Vite ^7.0.0 but the current Vite version is x.y.z
Installed Vite version is older than required peer dependency.
fix
Upgrade Vite to version 7.x: npm install vite@7
Upgrade
Version history
0.3.15latest on npm
Audit
Dependencies
viterequiredpeer dependency: required for Vite plugin integration
Agent activity
4 hits · last 30 days
node
4
Resources
vite-zipper — npm install vite-zipper · libregistry