Skip to content

Commit

Permalink
refactor(plugin-content): code refactor (#11312)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 authored Jun 25, 2024
1 parent 86515f4 commit 02c37c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/astro/src/core/build/plugins/plugin-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
},
};
Expand Down

0 comments on commit 02c37c7

Please sign in to comment.