Skip to content

Commit

Permalink
Merge branch 'canary' into antd
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jia-nan authored Sep 14, 2023
2 parents f752c33 + 6506c1c commit bb5d75f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/next/src/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function getMiddlewareMatcher(
}

export default class NextNodeServer extends BaseServer {
private _serverDistDir: string | undefined
private imageResponseCache?: ResponseCache
protected renderWorkersPromises?: Promise<void>
protected renderWorkerOpts?: Parameters<
Expand Down Expand Up @@ -1886,8 +1887,13 @@ export default class NextNodeServer extends BaseServer {
return result
}

protected get serverDistDir() {
return join(this.distDir, SERVER_DIRECTORY)
protected get serverDistDir(): string {
if (this._serverDistDir) {
return this._serverDistDir
}
const serverDistDir = join(this.distDir, SERVER_DIRECTORY)
this._serverDistDir = serverDistDir
return serverDistDir
}

protected async getFallbackErrorComponents(): Promise<LoadComponentsReturnType | null> {
Expand Down

0 comments on commit bb5d75f

Please sign in to comment.