Skip to content

Commit

Permalink
Omit manifest entry files for metadata routes in middleware manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Oct 14, 2024
1 parent 31271f8 commit a477d82
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { webpack } from 'next/dist/compiled/webpack/webpack'
import { WEBPACK_RESOURCE_QUERIES } from '../../../../lib/constants'
import type { MiddlewareConfig } from '../../../analysis/get-page-static-info'
import { loadEntrypoint } from '../../../load-entrypoint'
import { isMetadataRoute } from '../../../../lib/metadata/is-metadata-route'

export type EdgeAppRouteLoaderQuery = {
absolutePagePath: string
Expand Down Expand Up @@ -36,7 +37,7 @@ const EdgeAppRouteLoader: webpack.LoaderDefinitionFunction<EdgeAppRouteLoaderQue
const buildInfo = getModuleBuildInfo(this._module)

buildInfo.nextEdgeSSR = {
isServerComponent: true, // Needed for 'use cache'.
isServerComponent: !isMetadataRoute(page), // Needed for 'use cache'.
page: page,
isAppDir: true,
}
Expand Down

0 comments on commit a477d82

Please sign in to comment.