copy-webpack-output-plugin
v1.0.0
Published
A webpack plugin to copy your output files to somewhere
Downloads
4
Readme
copy-webpack-output-plugin
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