1.2.0 • Published 5 years ago

archiver-webpack-plugin v1.2.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

npm node dependencies test semantic-release

Table of Contents

Installation

npm install archiver archiver-webpack-plugin --save-dev

Usage

Using the built-in Archiver instance

const ArchiverPlugin = require("archiver-webpack-plugin");

module.exports = {
  plugins: [
    new ArchiverPlugin({
      format: "zip",
      formatOptions: {
        zlib: {
          level: 9,
        },
      },
    }),
  ],
};

Using a custom Archiver instance

const ArchiverPlugin = require("archiver-webpack-plugin");
const archiver = require("archiver");

const archive = archiver("zip", {
  zlib: {
    level: 9,
  },
});

module.exports = {
  plugins: [
    new ArchiverPlugin({
      archive,
    }),
  ],
};

Arguments:

  • output: The archive output path.
  • test: All assets matching this RegExp are processed. Defaults to every asset.
  • format: The archive format. Defaults to "zip".
  • formatOptions: The archive format options. Defaults to "{}".
  • archive: An Archiver instance. Defaults to the built-in instance.

API

See the detailed API Reference.

Author

Alexandre Breteau - @0xSeldszar

License

MIT © Alexandre Breteau

1.2.0

5 years ago

1.1.0

6 years ago

1.0.0

7 years ago