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

Drop edge prerender manifest #67787

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed props in web-server
  • Loading branch information
huozhi committed Jul 15, 2024
commit a4e83d4a4e20aec649f5eedb5ac76d8ffd9944a5
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import type { SizeLimit } from '../../../../types'
import { internal_getCurrentFunctionWaitUntil } from '../../../../server/web/internal-edge-wait-until'
import type { PAGE_TYPES } from '../../../../lib/page-types'
import type { NextRequestHint } from '../../../../server/web/adapter'
import { getEdgePreviewProps } from '../../../../server/web/get-edge-preview-props'

export function getRender({
dev,
Expand Down Expand Up @@ -86,12 +85,6 @@ export function getRender({
page,
pathname: isAppPath ? normalizeAppPath(page) : page,
pagesType,
prerenderManifest:
process.env.NODE_ENV === 'production'
? {
preview: getEdgePreviewProps(),
}
: undefined,
interceptionRouteRewrites,
extendRenderOpts: {
buildId,
Expand Down
21 changes: 6 additions & 15 deletions packages/next/src/server/web-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type RenderResult from './render-result'
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta'
import type { Params } from '../shared/lib/router/utils/route-matcher'
import type { LoadComponentsReturnType } from './load-components'
import type { PrerenderManifest } from '../build'
import type {
LoadedRenderOpts,
MiddlewareRoutingItem,
Expand Down Expand Up @@ -33,7 +32,6 @@ import type { PAGE_TYPES } from '../lib/page-types'
import type { Rewrite } from '../lib/load-custom-routes'
import { buildCustomRoute } from '../lib/build-custom-route'
import { UNDERSCORE_NOT_FOUND_ROUTE } from '../api/constants'
import type { DeepReadonly } from '../shared/lib/deep-readonly'
import { getEdgeInstrumentationModule } from './web/globals'
import type { ServerOnInstrumentationRequestError } from './app-render/types'
import { getEdgePreviewProps } from './web/get-edge-preview-props'
Expand All @@ -52,9 +50,6 @@ interface WebServerOptions extends Options {
| typeof import('./app-render/app-render').renderToHTMLOrFlight
| undefined
incrementalCacheHandler?: any
prerenderManifest:
| DeepReadonly<Pick<PrerenderManifest, 'preview'>>
| undefined
interceptionRouteRewrites?: Rewrite[]
}
}
Expand Down Expand Up @@ -142,17 +137,13 @@ export default class NextWebServer extends BaseServer<
}

protected getPrerenderManifest() {
const { prerenderManifest } = this.serverOptions.webServerConfig
if (this.renderOpts?.dev || !prerenderManifest) {
return {
version: -1 as any, // letting us know this doesn't conform to spec
routes: {},
dynamicRoutes: {},
notFoundRoutes: [],
preview: getEdgePreviewProps(),
}
return {
version: -1 as any, // letting us know this doesn't conform to spec
routes: {},
dynamicRoutes: {},
notFoundRoutes: [],
preview: getEdgePreviewProps(),
}
return prerenderManifest
}

protected getNextFontManifest() {
Expand Down
Loading