@jswork/archiver-webpack-plugin

Archiver webpack plugin.

Usage no npm install needed!

<script type="module">
  import jsworkArchiverWebpackPlugin from 'https://cdn.skypack.dev/@jswork/archiver-webpack-plugin';
</script>

README

archiver-webpack-plugin

Archiver webpack plugin.

installation

npm install -D @jswork/archiver-webpack-plugin

usage

import ArchiverWebpackPlugin from '@jswork/archiver-webpack-plugin';

// plugins:
plugiins:[
  new ArchiverWebapckPlugin({
    transform: function (inValue) {
      return 'app/' + inValue;
    },
    output: function (inPath, inExt) {
      return inPath.replace('dist', 'dist/app') + inExt;
    }
  })
]

options

Name Type Default Description
format String tar archiver format options
formatOptions Object { gzip: true, zlib: { level: 9 } } archiver options
transform Function - replace to transform package path.
output Function - replace to output package path.
ext String .tar.gz Package extention

resources