Skip to content

Commit 741b539

Browse files
authored
fix: only report actually copied traced files (opennextjs#831)
1 parent 195b67d commit 741b539

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/moody-pianos-allow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
fix: only report actually copied traced files

packages/open-next/src/build/copyTracedFiles.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,16 @@ File ${fullFilePath} does not exist
243243
computeCopyFilesForPage(route);
244244
});
245245

246+
// Only files that are actually copied
247+
const tracedFiles: string[] = [];
248+
246249
//Actually copy the files
247250
filesToCopy.forEach((to, from) => {
248251
// We don't want to copy excluded packages (i.e sharp)
249252
if (isExcluded(from)) {
250253
return;
251254
}
255+
tracedFiles.push(to);
252256
mkdirSync(path.dirname(to), { recursive: true });
253257
let symlink = null;
254258
// For pnpm symlink we need to do that
@@ -355,7 +359,7 @@ File ${fullFilePath} does not exist
355359
logger.debug("copyTracedFiles:", Date.now() - tsStart, "ms");
356360

357361
return {
358-
tracedFiles: Array.from(filesToCopy.values()),
362+
tracedFiles,
359363
manifests: getManifests(standaloneNextDir),
360364
};
361365
}

0 commit comments

Comments
 (0)