I use
new CopyWebpackPlugin([
'res/**/*.*'
])
and
webpack -w --mode=development
When watching, if I create a new file (like res/test.txt), it would not copy to the output path.
I must restart webpack.
@k8w strange, can you create minimum reproducible test repo?
@evilebottnawi Here~
https://github.com/k8w/copy-webpack-plugin-issue-252
Any update on this?
I can confirm the issue (using [email protected] and [email protected]). It also doesn't work when using webpack-dev-server instead of watch mode.
EDIT: I just read about write-file-webpack-plugin in your readme and will give that a try when using webpack-dev-server.
When webpack in watch mode, he use memory-fs to increase perf and you can't see files in file system when you in watch mode, it is expected. I update readme about this in near future. Solution:
@evilebottnawi The issue is not about it not writing files to filesystem, but about it not noticing new files.
I've run into it with webpack-dev-server. I believe it has to do with it not adding dependencies when from is a glob, as opposed to dirs, and files.
The workaround is to, e.g., replace 'src/assets/**/*' with {from: 'src/assets', to: 'assets'}.
@x-yuri please create minimum reproducible test repo
@evilebottnawi Doesn't the one from the earlier post work for you? It says:
If I add a 3.txt into res, it would not trigger webpack recompile.(watch mode)
Most helpful comment
When webpack in watch mode, he use
memory-fsto increase perf and you can't see files in file system when you in watch mode, it is expected. I update readme about this in near future. Solution: