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
-
outName see breaking changes when 1.2.0
- your zip file name
- default value is 'dist.zip'
-
folderPath
- the target folder you want to zip
- default value is './dist'
-
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