Improve `rename` option JSDoc
benzsuankularb opened this issue · 2 comments
benzsuankularb commented
Add the ability to transform file structure.
viteStaticCopy({
targets: [
{
src: [
'node_modules/my-lib/dist/**/*',
],
dest: '.',
transformStructure: (path) => path.replace('node_modules/my-lib/dist/', '')
},
],
structured: true,
}),
sapphi-red commented
Won't the rename
option work for that?
benzsuankularb commented
Ah, I previously saw rename func returning a string,
Not sure what's the return value is expected but thought it was only the filename that could be changed.
So this option should work if rename
could recompose the full path here.
We may need some documents for this.