Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/moody-pianos-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/aws": patch
---

fix: only report actually copied traced files
6 changes: 5 additions & 1 deletion packages/open-next/src/build/copyTracedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,16 @@ File ${fullFilePath} does not exist
computeCopyFilesForPage(route);
});

// Only files that are actually copied
const tracedFiles: string[] = [];

//Actually copy the files
filesToCopy.forEach((to, from) => {
// We don't want to copy excluded packages (i.e sharp)
if (isExcluded(from)) {
return;
}
tracedFiles.push(to);
mkdirSync(path.dirname(to), { recursive: true });
let symlink = null;
// For pnpm symlink we need to do that
Expand Down Expand Up @@ -355,7 +359,7 @@ File ${fullFilePath} does not exist
logger.debug("copyTracedFiles:", Date.now() - tsStart, "ms");

return {
tracedFiles: Array.from(filesToCopy.values()),
tracedFiles,
manifests: getManifests(standaloneNextDir),
};
}