Unverified Commit d9b85667 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

remove unused preloadConfig flag (#68082)

Noticed this while looking at something else. This value is not used
anywhere and makes the existing code harder to read.
parent 48235e68
......@@ -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<Pick<ServerOptions | DevServerOptions, 'conf'>> & {
preloadedConfig?: NextConfigComplete
internal_setStandaloneConfig?: boolean
}
Partial<Pick<ServerOptions | DevServerOptions, 'conf'>>
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') {
......
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