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

fixup

parent 96bfd47a
...@@ -987,5 +987,6 @@ ...@@ -987,5 +987,6 @@
"986": "Server Action arguments list is too long (%s). Maximum allowed is %s.", "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", "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", "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( ...@@ -2011,7 +2011,9 @@ export default async function build(
: []), : []),
// When deploymentId is available, headers are used for softnavs, and the build id // When deploymentId is available, headers are used for softnavs, and the build id
// isn't needed anymore. // 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 + '.js'),
path.join(SERVER_DIRECTORY, NEXT_FONT_MANIFEST + '.json'), path.join(SERVER_DIRECTORY, NEXT_FONT_MANIFEST + '.json'),
SERVER_FILES_MANIFEST + '.json', SERVER_FILES_MANIFEST + '.json',
......
...@@ -239,7 +239,7 @@ export type GenerateFlight = typeof generateDynamicFlightRenderResult ...@@ -239,7 +239,7 @@ export type GenerateFlight = typeof generateDynamicFlightRenderResult
export type AppSharedContext = { export type AppSharedContext = {
buildId: string | undefined buildId: string | undefined
deploymentId: string deploymentId: string | undefined
} }
export type AppRenderContext = { export type AppRenderContext = {
...@@ -2432,7 +2432,7 @@ export const renderToHTMLOrFlight: AppPageRender = ( ...@@ -2432,7 +2432,7 @@ export const renderToHTMLOrFlight: AppPageRender = (
renderOpts, renderOpts,
// @TODO move to workUnitStore of type Request // @TODO move to workUnitStore of type Request
isPrefetchRequest, isPrefetchRequest,
buildId: sharedContext.deploymentId, buildId: sharedContext.buildId || sharedContext.deploymentId || '',
previouslyRevalidatedTags, previouslyRevalidatedTags,
nonce, nonce,
}) })
......
...@@ -306,7 +306,7 @@ export type PagesSharedContext = { ...@@ -306,7 +306,7 @@ export type PagesSharedContext = {
/** /**
* The deployment ID if the user is deploying to a platform that provides one. * 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. * True if the user is using a custom server.
......
...@@ -703,7 +703,10 @@ export class AppRouteRouteModule extends RouteModule< ...@@ -703,7 +703,10 @@ export class AppRouteRouteModule extends RouteModule<
const staticGenerationContext: WorkStoreContext = { const staticGenerationContext: WorkStoreContext = {
page: this.definition.page, page: this.definition.page,
renderOpts: context.renderOpts, renderOpts: context.renderOpts,
buildId: context.sharedContext.deploymentId, buildId:
context.sharedContext.deploymentId ||
context.sharedContext.buildId ||
'',
previouslyRevalidatedTags: [], 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