Skip to content

Commit 8a361ae

Browse files
committed
feat: swap cache patch for forced manual revalidate
1 parent 18c2333 commit 8a361ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime/src/helpers/files.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ const getServerFile = (root: string, includeBase = true) => {
334334
}
335335

336336
const baseServerReplacements: Array<[string, string]> = [
337-
[`let ssgCacheKey = `, `let ssgCacheKey = process.env._BYPASS_SSG || `],
337+
[`checkIsManualRevalidate(req, this.renderOpts.previewProps)`, `checkIsManualRevalidate({ headers: null }, null)`],
338+
[`isManualRevalidate && (fallbackMode !== false || hadCache)`, `isManualRevalidate && hadCache`],
339+
[`private: isPreviewMode || is404Page && cachedData`, `private: isPreviewMode && cachedData`],
338340
]
339341

340342
const nextServerReplacements: Array<[string, string]> = [

0 commit comments

Comments
 (0)