0.0.4 • Published 2 years ago

vite-compression-plugin v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vite-Compression-Plugin

This is a compression plugin for vite. Use node stream.

Install

$ yarn add vite-compression-plugin -D

# or

$ npm install vite-compression-plugin -D

Usage

import { defineConfig } from 'vite'

import Compression from 'vite-compression-plugin'

export default defineConfig({
  plugins: [
    // ...your plugin
    Compression()
  ]
})

Options

paramstypedefaultdescription
excludeArray<string>[]Exclude all assets matching any of these conditions,Details seefast-glob
thresholdnumber[]Only assets bigger than this size are processed (in bytes)
algorithmstringgzipThe compression algorithm
compressionOptionsRecord<string,any>gzipCompression options for algorithm
deleteOriginalAssetsboolean\|keep-source-mapfalseWhether to delete the original assets or not
loginfosilent\|infoinfoconsola compressed info

LICENSE

MIT

Author

Kanno

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago