Socket
Socket
Sign inDemoInstall

vite-plugin-compression

Package Overview
Dependencies
4
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-compression


Version published
Weekly downloads
116K
increased by3.04%
Maintainers
1
Created
Weekly downloads
 

Package description

What is vite-plugin-compression?

vite-plugin-compression is a Vite plugin that enables compression of assets using various algorithms like gzip, brotli, and more. This helps in reducing the size of the assets served to the client, thereby improving load times and overall performance.

What are vite-plugin-compression's main functionalities?

Gzip Compression

This feature allows you to compress your assets using the gzip algorithm. Gzip is widely supported and can significantly reduce the size of your assets.

json
{
  "plugins": [
    require('vite-plugin-compression')({
      algorithm: 'gzip'
    })
  ]
}

Brotli Compression

This feature allows you to compress your assets using the Brotli algorithm. Brotli often provides better compression rates compared to gzip.

json
{
  "plugins": [
    require('vite-plugin-compression')({
      algorithm: 'brotliCompress'
    })
  ]
}

Custom Compression Options

This feature allows you to customize various options for the compression process, such as the file extension, compression threshold, and whether to delete the original file after compression.

json
{
  "plugins": [
    require('vite-plugin-compression')({
      algorithm: 'gzip',
      ext: '.gz',
      threshold: 10240,
      deleteOriginFile: false
    })
  ]
}

Other packages similar to vite-plugin-compression

Changelog

Source

0.5.1 (2022-01-29)

Bug Fixes

  • build error,close #13 (dbc3247)
  • return a promise to have it awaited (24b77ae)

Keywords

FAQs

Last updated on 29 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc