Rollup plugin to easily copy files and folders. Glob supported
npm i -D rollup-plugin-copy-glob
import copy from 'rollup-plugin-copy-glob';
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.js',
format: 'iife',
name: 'app'
},
plugins: [
copy([
{ files: 'src/*.{html,css}', dest: 'dist' },
{ files: 'dev/fonts/*.*', dest: 'dist/fonts' },
{ files: 'dev/images/**/*.*', dest: 'dist/images' }
], { verbose: true, watch: true })
]
};
- verbose (default is
false
). Enable/disable logging - watch (default is
false
). Enable/disable watching. If disabled then copy only on start