@voyo/gzip-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

gzip-webpack-plugin

Gzip compress the output files.

Install

npm install @voyo/gzip-webpack-plugin --save-dev

Usage

webpack.config.js

const {GzipWebpackPlugin}=require("@voyo/gzip-webpack-plugin"); 
...
plugins:[
    //Files in all formats will be gzip compress 
    new GzipWebpackPlugin(),
    //or...
    //Only files with js,css,html suffixes are gzip compress.
    new GzipWebpackPlugin({
       extList:["js","css","html"],
       disabled:process.env.NODE_ENV!=="production"  //disabled plugin via NODE_ENV.
    })
]

Options

  • extList: string[] optional

Specify the suffix name of the file to be compressed.. All files will be compressed if not specified.

  • outputPath: string optional

  • disabled: boolean optional equiv output.path

Readme

Keywords

Package Sidebar

Install

npm i @voyo/gzip-webpack-plugin

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

12.4 kB

Total Files

6

Last publish

Collaborators

  • zhantewei
  • echo_hx
  • lansang
  • lousicong
  • buildstrap