diff --git a/packages/next/src/server/next-server.ts b/packages/next/src/server/next-server.ts index 6fe8d0d6e23dd..0271395ba1d13 100644 --- a/packages/next/src/server/next-server.ts +++ b/packages/next/src/server/next-server.ts @@ -146,7 +146,6 @@ function getMiddlewareMatcher( export default class NextNodeServer extends BaseServer { protected middlewareManifestPath: string - protected middlewareManifest: MiddlewareManifest | undefined private _serverDistDir: string | undefined private imageResponseCache?: ResponseCache protected renderWorkersPromises?: Promise @@ -1339,13 +1338,7 @@ export default class NextNodeServer extends BaseServer { protected getMiddlewareManifest(): MiddlewareManifest | null { if (this.minimalMode) return null - - if (this.middlewareManifest) { - return this.middlewareManifest - } - const manifest: MiddlewareManifest = require(this.middlewareManifestPath) - this.middlewareManifest = manifest return manifest }