We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418d5b6 commit afaabb9Copy full SHA for afaabb9
src/features/copy.ts
@@ -39,14 +39,16 @@ export type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>
39
export async function copy(options: ResolvedConfig): Promise<void> {
40
if (!options.copy) return
41
42
- const copy: CopyOptions =
+ const copy = toArray(
43
typeof options.copy === 'function'
44
? await options.copy(options)
45
- : options.copy
+ : options.copy,
46
+ )
47
+ if (!copy.length) return
48
49
const resolved = (
50
await Promise.all(
- toArray(copy).map(async (entry) => {
51
+ copy.map(async (entry) => {
52
if (typeof entry === 'string') {
53
entry = { from: [entry] }
54
}
0 commit comments