🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

webpack-files-archive-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-files-archive-plugin

Webpack 5 plugin to create archives of emitted files

1.0.1
latest
Source
npm
Version published
Weekly downloads
227
44.59%
Maintainers
1
Weekly downloads
 
Created
Source

webpack-files-archive-plugin

Webpack 5 plugin to create archives of emitted files

NPM Version NPM Downloads

Installation

npm install --save-dev webpack-files-archive-plugin

This is a fork of original plugin https://github.com/autochthe/webpack-archive-plugin. The current plugin only support Webpack 5. For Webpack 4 use original plugin.

Usage

webpack.config.js:

let WebpackFilesArchivePlugin = require('webpack-files-archive-plugin');

module.exports = {
	// configuration
	output: {
		path: __dirname + '/dist',
	},
	plugins: [
		new WebpackFilesArchivePlugin(),
	],
}

Will create two archives in the same directory as output.path (__dirname in the example), ${output.path}.tar.gz and ${output.path}.zip containing all compiled assets.

Options

You can pass options when constructing a new plugin, for example new WebpackFilesArchivePlugin(options).

The options object supports the following properties:

output

Type: String Default: output.path

Directory location of files to be archived.

format

Type: String|Array Default: zip|tar.gz

Archive formats to use, can be 'tar' or 'zip'

ext

Type: String Default: zip|tar.gz

A different extension to use instead of tar.gz or zip (without leading .)

Keywords

archive

FAQs

Package last updated on 12 Dec 2020

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