@uraitakahito/rollup-plugin-copy
v3.5.7
Published
Watching targets, copy files and folders using Rollup. This is a variant of the rollup-plugin-copy. It is recommended to use the original plugin unless this variant is specifically needed.
Downloads
10
Maintainers
Readme
rollup-plugin-copy
Copy files and folders, with glob support.
This is a variant of rollup-plugin-copy.
The following changes have been made:
- Added a feature to watch for changes in files specified in
targets'srcduring watch mode. - Only changes in
inputandtargets'srcare detected. In other words,targets'destis not monitored. - This feature is off by default. When off, it is compatible with the original.
Original rollup-plugin-copy is here.
Original rollup-plugin-copy pull request is here.
Usage
Additional Configuration
watchTargets
Type: boolean | Default: false
Add the files specified in targets to the watch list
import copy from "@uraitakahito/rollup-plugin-copy";
export default {
input: "src/main.js",
output: {
file: "dist/bundle.js",
format: "es",
},
plugins: [
copy({
targets: [
{ src: "src/index.html", dest: "dist" },
{ src: "src/image/**/*", dest: "dist/image" },
],
verbose: true,
watchTargets: true,
}),
],
};And run:
% rollup --config --watchA sample repository using this plugin can be found here.
Original Author
License
MIT
