vite-plugin-auto-zip

v1.2.0
provide a vite plugin then zip your file after compile done
vite plugin zip files

vite-plugin-auto-zip

my first vite plugin named auto-zip,mean it will auto zip your dist files after vite build done ,only emit when production

basic use on vite.config.js

Just in case, make sure AutoZip is the last item in the plugins

import AutoZip from 'vite-plugin-auto-zip'
{
    plugins:[
        AutoZip()
    ]
}

params of AutoZip

  1. outName see breaking changes when 1.2.0

    • your zip file name
    • default value is 'dist.zip'
  2. folderPath

    • the target folder you want to zip
    • default value is './dist'
  3. outPath

    • the output folder you want to put the zip file
    • default value is './dist'
function AutoZip(outName: string = 'dist.zip', folderPath: string = './dist', outPath: string = './dist') {
}

breaking changes

v1.2.0

  • outName will be first params
npm i vite-plugin-auto-zip

Metadata

  • MIT
  • Whatever
  • webszy
  • released 1/27/2024

Downloads

Maintainers