0.0.3 • Published 5 years ago

webpack-archiver-plugin v0.0.3

Weekly downloads
14
License
SEE LICENSE IN <h...
Repository
github
Last release
5 years ago

webpack-archiver-plugin

Webpack plugin to create archives of emitted files.

NPM Version NPM Downloads 996ICU license

Installation

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

Usage

webpack.config.js:

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

module.exports = {
  // configuration
  output: {
    path: '/dist',
  },
  plugins: [
    new ArchiverPlugin({
      name: 'dist',
      ext: '.tar',
    }),
  ],
}

Will create a archive in the same directory as output.path (__dirname in the example), ${output.path}.tar.gz contains all compiled assets.

Options

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

The options object supports the following properties:

  • name: string -> Output name of archives (without extension)
  • ext: string -> A different extension to use instead of .tar,.tar.gzorzip`

If options is a string, this is eqiuvalent to passing {output: options}.

License

MIT with 996ICU