JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 401
  • Score
    100M100P100Q98563F
  • License MIT

zip files at build time.

Package Exports

  • vite-plugin-zip-file
  • vite-plugin-zip-file/lib/index.cjs
  • vite-plugin-zip-file/lib/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vite-plugin-zip-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vite-plugin-zip-file

Zip files at build time.

Install

yarn add vite-plugin-zip-file --dev

or

npm install vite-plugin-zip-file --save-dev

Optons

Param Types Rquired Default Desc
folderPath String|Path true - Path to the compressed folder
outPath String|Path true - Compressed package output path
zipName String false dist Package name

Usage

import { defineConfig } from 'vite';
import { viteZip } from 'vite-plugin-zip-file';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    viteZip({
      folderPath: path.resolve(__dirname, 'dist'),
      outPath: path.resolve(__dirname),
      zipName: 'Test.zip'
    })
  ]
})