1.2.0 • Published 7 years ago
archiver-webpack-plugin v1.2.0
Table of Contents
Installation
npm install archiver archiver-webpack-plugin --save-devUsage
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