Skip to content

a plugin for rollup to compress the dist directory, it also apply to Vite

Notifications You must be signed in to change notification settings

DistechControls/rollup-plugin-compress-dist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A plugin for rollup or vite to compress the bundle directory which supports .zip .tar .tgz formats.

Usage

  1. download from npm
  npm install rollup-plugin-compress-dist --dev
  1. Modify configuration file of project. it would archive dist directory to dist.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)],
  ...
});

About

a plugin for rollup to compress the dist directory, it also apply to Vite

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%