Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

vite-plugin-compression2

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-compression2

compress souce file by stream, use it in vite.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
184K
8.1%
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-compression2

This is a compression plugin for vite.

Install


$ yarn add vite-plugin-compression2 -D

# or

$ npm install vite-plugin-compression2 -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
thresholdnumber100Only assets bigger than this size are processed (in bytes)
algorithmstringgzipThe compression algorithm
compressionOptionsRecord<string,any>{}Compression options for algorithm
deleteOriginalAssetsboolean|keep-source-mapfalseWhether to delete the original assets or not
loginfosilent|infoinfoconsola compressed info

Q & A

Why not vite-plugin-compression

  • vite-plugin-compression no longer maintenance.

Why vite-plugin-compression2

  • vite-plugin-compression has minimal dependencies and better performance.

LICENSE

MIT

Author

Kanno

Keywords

vite

FAQs

Package last updated on 24 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts