mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
refactor(plugin-content): code refactor (#11312)
This commit is contained in:
parent
86515f445e
commit
02c37c7b8c
1 changed files with 5 additions and 1 deletions
|
@ -508,11 +508,15 @@ export function pluginContent(
|
|||
return;
|
||||
}
|
||||
// Cache build output of chunks and assets
|
||||
const promises: Promise<void[] | undefined>[] = []
|
||||
for (const { cached, dist } of cachedBuildOutput) {
|
||||
if (fsMod.existsSync(dist)) {
|
||||
await copyFiles(dist, cached, true);
|
||||
promises.push(copyFiles(dist, cached, true));
|
||||
}
|
||||
}
|
||||
|
||||
if (promises.length)
|
||||
await Promise.all(promises)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue