Open quotquot opened 6 years ago
A workaround is to make a change to one of the files that is watched, which will trigger the copy without having to kill the watch process.
Any update on this?
I was not sure if it is supposed to watch the files or not because there is this copyOnce
option.
To others desperately searching for a solution to this, there's a fork here that worked for me:
https://www.npmjs.com/package/@guanghechen/rollup-plugin-copy
There is an open PR #42 from the author as well:
A comment on that PR says to use watch: { exclude: 'build/**' }
- I didn't need to do that, it just worked.
@mindplay-dk That exclude configuration is only needed when you try to watch files in the build
folder (often named dist
). As I already commented in the PR, watching files in the build output doesn't make sense anyway so this setting is not needed at all. Sorry for the confusion.
Any update about the PR @vladshcherbin?
When running rollup in watch mode, if a change is made to a copied asset, the modified asset should be copied again to the target directory. Right now one has to kill the watch process and re-run it for the copy to be done. It breaks the "mental flow" of development since one has to constantly remember that changes made to the edited buffer are not propagated automatically, unlike other sources. How many times have I reloaded the web page, wondered why it's not working, before realizing I forgot to kill the watch process and rerun it?