esc1-zip
v1.1.4
Published
A plugin for rollup or vite to compress the bundle directory which supports `.zip` `.tar` `.tgz` formats.
Downloads
4
Readme
A plugin for rollup or vite to compress the bundle directory which supports .zip
.tar
.tgz
formats.
Usage
- download from npm
npm install rollup-plugin-compress-dist --dev
- Modify configuration file of project. it would archive
dist
directory todist.tar.gz
by default.For example:
//vite.config.ts
import { defineConfig } from 'vite';
import compressDist, { CompressOptions } from 'rollup-plugin-compress-dist';
...
const compressOpts: CompressOptions<'tgz'> = {
type: 'tgz',
archiverName: 'dist.tar.gz',
sourceName: 'dist',
};
export default defineConfig({
plugins: [compressDist(compressOpts)],
...
});