TypeError: plugin.options.call is not a function
Closed this issue · 3 comments
michapixel commented
hi, thanks for this plugin but it seems to cause an error with rollup v2.38.5
i'm using it like:
copy({
watch: ["src/index.html", "src/global.css", "src/global.js", "src/favicon.png", "src/assets/fonts/**/*"],
targets: [
{ src: "src/index.html", dest: path.resolve(__dirname, "../public") },
{ src: "src/global.css", dest: path.resolve(__dirname, "../public") },
{ src: "src/global.js", dest: path.resolve(__dirname, "../public") },
{ src: "src/favicon.png", dest: path.resolve(__dirname, "../public") },
{
src: "src/assets/fonts/**/*",
dest: path.resolve(__dirname, "../public/assets/fonts/"),
},
],
}),
which causes the error:
[!] TypeError: plugin.options.call is not a function
michapixel commented
Uhhh, somehow i managedf to misunderstand the option for watch, which causes this error.
I thought an array of filenames/globs would be okay. but looking at your deocs it's either "string" or "string[]" ... what do you mean by "string[]" ?
michapixel commented
Oh and btw: can we pass options to chokidar?
michapixel commented
oh, string[] means an array of strings ... ;)
and no, no options for chokidar, i saw that already.
anyway: thanks for this nice plugin.
You should consider using other options for chokidar, since it seems to copy over ALL files each time ONE file changes.