I'm copying lots of files using the CopyWebpackPlugin, and I want them to be copied only if the files at the destination are older. The same as was common in grunt / gulp.
new CopyWebpackPlugin({
patterns: [
{ from: "./node_modules/jquery/dist/jquery.min.js", to: "./libs/" },
],
}),
But the output always shows:
asset libs/jquery.min.js 87.4 KiB [compared for emit] [from: node_modules/jquery/dist/jquery.min.js] [copied]
which implies that it copies it each time.
How do I make it copy only if the destination is missing or the source is newer?