This is trying to copy all images in src and copy them to dist, but maintaining the folder structure. The directory that should be created is resolve(dest, options.cwd) not dest. In this case, the plugin with create a folder one directory above, but cpy will copy fine. Maybe this mkdirp isn't even needed here since it seems to be handled by cpy.
Was having issues with this line with this plugin trying to run
mkdirp
. Here's the offending line: https://github.com/paulmelnikow/rollup-plugin-cpy/blob/master/src/index.js#L28Example
This is trying to copy all images in
src
and copy them todist
, but maintaining the folder structure. The directory that should be created isresolve(dest, options.cwd)
notdest
. In this case, the plugin with create a folder one directory above, but cpy will copy fine. Maybe thismkdirp
isn't even needed here since it seems to be handled bycpy
.