From f797459561dc351e5a75838428091a5eadb440cd Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:21:06 -0700 Subject: [PATCH] remove unused preloadConfig flag --- packages/next/src/server/next.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/next/src/server/next.ts b/packages/next/src/server/next.ts index 1717c4703a244..43c232ea1e831 100644 --- a/packages/next/src/server/next.ts +++ b/packages/next/src/server/next.ts @@ -4,7 +4,6 @@ import type { Options as ServerOptions, } from './next-server' import type { UrlWithParsedQuery } from 'url' -import type { NextConfigComplete } from './config-shared' import type { IncomingMessage, ServerResponse } from 'http' import type { NextUrlWithParsedQuery } from './request-meta' import type { WorkerRequestHandler, WorkerUpgradeHandler } from './lib/types' @@ -41,10 +40,7 @@ export type NextServerOptions = Omit< // This is assigned in this server abstraction. 'conf' > & - Partial> & { - preloadedConfig?: NextConfigComplete - internal_setStandaloneConfig?: boolean - } + Partial> export interface RequestHandler { ( @@ -185,16 +181,14 @@ export class NextServer { private async [SYMBOL_LOAD_CONFIG]() { const dir = resolve(this.options.dir || '.') - const config = - this.options.preloadedConfig || - (await loadConfig( - this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER, - dir, - { - customConfig: this.options.conf, - silent: true, - } - )) + const config = await loadConfig( + this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER, + dir, + { + customConfig: this.options.conf, + silent: true, + } + ) // check serialized build config when available if (process.env.NODE_ENV === 'production') {