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 f739149 commit acd9eefCopy full SHA for acd9eef
src/generators/legacy-html/utils/safeCopy.mjs
@@ -23,14 +23,13 @@ export async function safeCopy(srcDir, targetDir) {
23
const sourcePath = join(srcDir, file);
24
const targetPath = join(targetDir, file);
25
26
- const [sStat, tStat] = await Promise.allSettled([
+ const [sStat, tStat] = await Promise.all([
27
stat(sourcePath),
28
stat(targetPath),
29
- ]);
+ ]).catch(() => []);
30
31
- const shouldWrite =
32
- tStat.status === 'rejected' ||
33
- sStat.value.size !== tStat.value.size ||
+ const shouldWrite = !tStat;
+ sStat.value.size !== tStat.value.size ||
34
sStat.value.mtimeMs > tStat.value.mtimeMs;
35
36
if (!shouldWrite) {
0 commit comments