rollup-plugin-compress-dist
v1.1.0
Published
A plugin for rollup or vite to compress the bundle directory which supports `.zip` `.tar` `.tgz` formats.
Downloads
9
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)],
...
});