-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
We should not copy and delete file there
opennextjs-aws/packages/open-next/src/build/createAssets.ts
Lines 75 to 89 in 73281c9
const outputPath = path.join(outputDir, "cache", buildId); | |
[".next/server/pages", ".next/server/app"] | |
.map((dir) => path.join(dotNextPath, dir)) | |
.filter(fs.existsSync) | |
.forEach((dir) => fs.cpSync(dir, outputPath, { recursive: true })); | |
// Remove non-cache files | |
const htmlPages = buildHelper.getHtmlPages(dotNextPath); | |
buildHelper.removeFiles( | |
outputPath, | |
({ relativePath }) => | |
relativePath.endsWith(".js") || | |
relativePath.endsWith(".js.nft.json") || | |
(relativePath.endsWith(".html") && htmlPages.has(relativePath)), | |
); |
Ideally, we should also add a revalidate
value (from the prerender manifest) here
Metadata
Metadata
Assignees
Labels
No labels