copy-webpack-output-plugin

1.0.0 • Public • Published

copy-webpack-output-plugin

npm version npm downloads node engine

A webpack plugin to copy your output files to somewhere

Install

npm i copy-webpack-output-plugin --save-dev

Usage

Copy directory or file

const CopyWebpackOutputPlugin = require('copy-webpack-output-plugin');

// copy dir
plugins: [
  new CopyWebpackOutputPlugin([{ src: '/tmp/mydir', dest: '/tmp/mynewdir' }]),
];

// copy file
plugins: [
  new CopyWebpackOutputPlugin([{ src: '/tmp/myfile', dest: '/tmp/mynewfile' }]),
];

// multiple
plugins: [
  new CopyWebpackOutputPlugin([
    { src: '/tmp/mydir', dest: '/tmp/mynewdir' },
    { src: '/tmp/myfile', dest: '/tmp/mynewfile' },
  ]),
];

With options

const filterFn = (src, dest) => {};

// with optioins
plugins: [
  new CopyWebpackOutputPlugin([
    { src: '/tmp/mydir', dest: '/tmp/mynewdir' },
    { filter: filterFn, overwrite: false },
  ]),
];

copy-webpack-output-plugin uses node-fs-extra as dependency, more about src, dest and options: node-fs-extra copy

License

MIT LICENSE

Readme

Keywords

Package Sidebar

Install

npm i copy-webpack-output-plugin

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • hiwangchi