diff --git a/.changeset/moody-pianos-allow.md b/.changeset/moody-pianos-allow.md new file mode 100644 index 00000000..de59807e --- /dev/null +++ b/.changeset/moody-pianos-allow.md @@ -0,0 +1,5 @@ +--- +"@opennextjs/aws": patch +--- + +fix: only report actually copied traced files diff --git a/packages/open-next/src/build/copyTracedFiles.ts b/packages/open-next/src/build/copyTracedFiles.ts index 0f278ae8..e01e49a8 100644 --- a/packages/open-next/src/build/copyTracedFiles.ts +++ b/packages/open-next/src/build/copyTracedFiles.ts @@ -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 @@ -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), }; }