We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7dbf6f8 commit 4002f4bCopy full SHA for 4002f4b
packages/next/src/server/base-server.ts
@@ -2810,7 +2810,11 @@ export default abstract class Server<ServerOptions extends Options = Options> {
2810
res.setHeader(NEXT_DID_POSTPONE_HEADER, '1')
2811
}
2812
2813
- if (isDataReq) {
+ // we don't go through this block when preview mode is true
2814
+ // as preview mode is a dynamic request (bypasses cache) and doesn't
2815
+ // generate both HTML and payloads in the same request so continue to just
2816
+ // return the generated payload
2817
+ if (isDataReq && !isPreviewMode) {
2818
// If this is a dynamic RSC request, then stream the response.
2819
if (isDynamicRSCRequest) {
2820
if (cachedData.pageData) {
0 commit comments