Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused preloadConfig flag #68082

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions packages/next/src/server/next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 {
(
Expand Down Expand Up @@ -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') {
Expand Down
Loading