New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

zip-stream-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zip-stream-webpack-plugin

Webpack plugin to zip assets with archiver

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

zip-stream-webpack-plugin

A webpack plugin to zip the output files which is highly customizable.

Install

npm install --save-dev zip-stream-webpack-plugin

Usage

webpack.config.js

var ZipStreamPlugin = require('zip-stream-webpack-plugin');

module.exports = {
    output: {
        path: path.join(__dirname, 'dist'),
        filename: 'main.js'
    },
    plugins: [
        new ZipStreamPlugin({
            // optional: defaults to webpack's output path & filename
            path: 'targets',
            filename: 'final_build.zip'

            // optional: include/exclude files, here exclude has high precedence over include
            exclude: [/__MAC*/, /DS_Store/, /.js.map/,],
            include: null,

            extension: "zip", // defaults to zip if no extension specified in output filename

            // optional: defaults to noop
            // it uses Archiver to zip the output directory
            customizeArchiver: (archive) => {
                // here archiver can be costomized 
                // see https://www.npmjs.com/package/archiver
            },

            // optional: the default behaviour of this plugin is to zip entire output directory.
            // With this flag it can be disabled and customize completely with 
            // customizeArchiver
            allowDefaults: true,

        })
    ]
}

Keywords

webpack

FAQs

Package last updated on 10 Aug 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