Unverified Commit 83172a90 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Allow ppr only flag in test mode (#62911)

parent 3c75ae7c
...@@ -299,6 +299,8 @@ export default abstract class Server<ServerOptions extends Options = Options> { ...@@ -299,6 +299,8 @@ export default abstract class Server<ServerOptions extends Options = Options> {
protected readonly enabledDirectories: NextEnabledDirectories protected readonly enabledDirectories: NextEnabledDirectories
protected abstract getEnabledDirectories(dev: boolean): NextEnabledDirectories protected abstract getEnabledDirectories(dev: boolean): NextEnabledDirectories
protected readonly experimentalTestProxy?: boolean
protected abstract findPageComponents(params: { protected abstract findPageComponents(params: {
page: string page: string
query: NextParsedUrlQuery query: NextParsedUrlQuery
...@@ -387,8 +389,10 @@ export default abstract class Server<ServerOptions extends Options = Options> { ...@@ -387,8 +389,10 @@ export default abstract class Server<ServerOptions extends Options = Options> {
customServer = true, customServer = true,
hostname, hostname,
port, port,
experimentalTestProxy,
} = options } = options
this.experimentalTestProxy = experimentalTestProxy
this.serverOptions = options this.serverOptions = options
this.dir = this.dir =
...@@ -2127,7 +2131,7 @@ export default abstract class Server<ServerOptions extends Options = Options> { ...@@ -2127,7 +2131,7 @@ export default abstract class Server<ServerOptions extends Options = Options> {
// instead of continuing to resume stream right away // instead of continuing to resume stream right away
const debugPPRSkeleton = Boolean( const debugPPRSkeleton = Boolean(
this.nextConfig.experimental.ppr && this.nextConfig.experimental.ppr &&
this.renderOpts.dev && (this.renderOpts.dev || this.experimentalTestProxy) &&
query.__nextppronly query.__nextppronly
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment