Unverified Commit 5f75d22b authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

backport: Only filter next config if experimental flag is enabled (#88733) (#88772)

Backports https://github.com/vercel/next.js/pull/88733Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
parent f01cf07a
...@@ -1852,11 +1852,15 @@ export default async function build( ...@@ -1852,11 +1852,15 @@ export default async function build(
} }
} }
// getNextConfigRuntime only filters if experimental.runtimeServerDeploymentId is true,
// but we unconditionally want to remove configFile for this manifest
let runtimeConfigWithoutFilePath = { ...runtimeConfig }
delete (runtimeConfigWithoutFilePath as NextConfigComplete).configFile
const serverFilesManifest: RequiredServerFilesManifest = { const serverFilesManifest: RequiredServerFilesManifest = {
version: 1, version: 1,
config: { config: {
...runtimeConfig, ...runtimeConfigWithoutFilePath,
...(ciEnvironment.hasNextSupport ...(ciEnvironment.hasNextSupport
? { ? {
compress: false, compress: false,
......
...@@ -1683,6 +1683,11 @@ export interface NextConfigRuntime { ...@@ -1683,6 +1683,11 @@ export interface NextConfigRuntime {
export function getNextConfigRuntime( export function getNextConfigRuntime(
config: NextConfigComplete | NextConfigRuntime config: NextConfigComplete | NextConfigRuntime
): NextConfigRuntime { ): NextConfigRuntime {
// This config filter is a breaking change, so only do it if experimental.runtimeServerDeploymentId is enabled
if (!config.experimental.runtimeServerDeploymentId) {
return config
}
let ex = config.experimental let ex = config.experimental
type Requiredish<T> = { type Requiredish<T> = {
......
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