Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions packages/open-next/src/adapters/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export default class S3Cache {
rscData: Buffer.from(cacheData.rsc),
status: meta?.status,
headers: meta?.headers,
postponed: meta?.postponed,
},
} as CacheHandlerValue;
}
Expand Down
6 changes: 5 additions & 1 deletion packages/open-next/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,12 @@ async function createCacheAssets(monorepoRoot: string) {
() => true,
(filepath) => {
const ext = path.extname(filepath);
const newFilePath =
let newFilePath =
ext !== "" ? filepath.replace(ext, ".cache") : `${filepath}.cache`;
// Handle prefetch cache files for partial prerendering
if (newFilePath.endsWith(".prefetch.cache")) {
newFilePath = newFilePath.replace(".prefetch.cache", ".cache");
}
switch (ext) {
case ".meta":
case ".html":
Expand Down
1 change: 1 addition & 0 deletions packages/open-next/src/cache/next-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ export type Extension = "cache" | "fetch";
export interface Meta {
status?: number;
headers?: Record<string, undefined | string | string[]>;
postponed?: string;
}
Loading