webpack-plugin-jszip

1.2.0 • Public • Published

WEBPACK PLUGIN JSZIP

A simple zip plugin of webpack for compressing all the bundle files into a single zip file.

how to use

install this package

npm install webpack-plugin-jszip -D

and use in webpack.config

// demo webpack.config.js
const zipPlugin = require('webpack-plugin-jszip');

module.exports = {
  entry: ...,
  output: ...,
  plugins: [
    new zipPlugin({
      dir: 'dist', // this property used to set the path of the directory that contains the bundle files.
      outDir: './', // this property used to set the path of the output directory
      filename: 'bundle' // this property used to set zip file name
    })
  ]
}

Options

  • dir: The directory that contains the bundle files. Its default value is webpack output path.
  • outDir: The output directory. Its default value is webpack output path.
  • filename: The name of the zip file. Its default value is bundle.

then, webpack build.

Readme

Keywords

Package Sidebar

Install

npm i webpack-plugin-jszip

Weekly Downloads

3

Version

1.2.0

License

ISC

Unpacked Size

6.84 kB

Total Files

8

Last publish

Collaborators

  • weijianxu