From a199a32f409cfea1a1ee2115d35300630b53dd92 Mon Sep 17 00:00:00 2001 From: Jimmy Lai Date: Mon, 30 Jan 2023 10:59:53 +0100 Subject: [PATCH] misc: deprecate custom config from being passed to next/build --- packages/next/src/build/index.ts | 3 +-- packages/next/src/cli/next-build.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 115e049fc29ed..9e484ae5d6617 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -249,7 +249,6 @@ function pageToRoute(page: string) { export default async function build( dir: string, - conf = null, reactProductionProfiling = false, debugOutput = false, runLint = true, @@ -271,7 +270,7 @@ export default async function build( const config: NextConfigComplete = await nextBuildSpan .traceChild('load-next-config') - .traceAsyncFn(() => loadConfig(PHASE_PRODUCTION_BUILD, dir, conf)) + .traceAsyncFn(() => loadConfig(PHASE_PRODUCTION_BUILD, dir)) const distDir = path.join(dir, config.distDir) setGlobal('phase', PHASE_PRODUCTION_BUILD) diff --git a/packages/next/src/cli/next-build.ts b/packages/next/src/cli/next-build.ts index 31f5b5bd01975..a2d5546ef2dec 100755 --- a/packages/next/src/cli/next-build.ts +++ b/packages/next/src/cli/next-build.ts @@ -72,7 +72,6 @@ const nextBuild: CliCommand = (argv) => { return build( dir, - null, args['--profile'], args['--debug'] || process.env.NEXT_DEBUG_BUILD, !args['--no-lint'],