Commit 1eb6986d authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

fixup

parent 96bfd47a
......@@ -987,5 +987,6 @@
"986": "Server Action arguments list is too long (%s). Maximum allowed is %s.",
"987": "Invalid \\`deploymentId\\` configuration: must be a string. See https://nextjs.org/docs/messages/deploymentid-not-a-string",
"988": "Invalid \\`deploymentId\\` configuration: contains invalid characters. Only alphanumeric characters, hyphens, and underscores are allowed. See https://nextjs.org/docs/messages/deploymentid-invalid-characters",
"989": "Loaded static props were from an outdated deployment, forcing a hard reload"
"989": "Loaded static props were from an outdated deployment, forcing a hard reload",
"990": "Invariant: buildID or deploymentId is required"
}
......@@ -2011,7 +2011,9 @@ export default async function build(
: []),
// When deploymentId is available, headers are used for softnavs, and the build id
// isn't needed anymore.
...(config.deploymentId ? [BUILD_ID_FILE] : []),
...(!config.deploymentId || !ciEnvironment.hasNextSupport
? [BUILD_ID_FILE]
: []),
path.join(SERVER_DIRECTORY, NEXT_FONT_MANIFEST + '.js'),
path.join(SERVER_DIRECTORY, NEXT_FONT_MANIFEST + '.json'),
SERVER_FILES_MANIFEST + '.json',
......
......@@ -239,7 +239,7 @@ export type GenerateFlight = typeof generateDynamicFlightRenderResult
export type AppSharedContext = {
buildId: string | undefined
deploymentId: string
deploymentId: string | undefined
}
export type AppRenderContext = {
......@@ -2432,7 +2432,7 @@ export const renderToHTMLOrFlight: AppPageRender = (
renderOpts,
// @TODO move to workUnitStore of type Request
isPrefetchRequest,
buildId: sharedContext.deploymentId,
buildId: sharedContext.buildId || sharedContext.deploymentId || '',
previouslyRevalidatedTags,
nonce,
})
......
......@@ -306,7 +306,7 @@ export type PagesSharedContext = {
/**
* The deployment ID if the user is deploying to a platform that provides one.
*/
deploymentId: string
deploymentId: string | undefined
/**
* True if the user is using a custom server.
......
......@@ -703,7 +703,10 @@ export class AppRouteRouteModule extends RouteModule<
const staticGenerationContext: WorkStoreContext = {
page: this.definition.page,
renderOpts: context.renderOpts,
buildId: context.sharedContext.deploymentId,
buildId:
context.sharedContext.deploymentId ||
context.sharedContext.buildId ||
'',
previouslyRevalidatedTags: [],
}
......
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