webpack-plugin-jszip
v1.2.0
Published
A simple zip plugin of webpack for compressing all the bundle files into a single zip file.
Downloads
5
Readme
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 isbundle
.
then, webpack build.