MCPcopy
hub / github.com/vercel/next.js / doRender

Function doRender

packages/next/src/server/route-modules/pages/pages-handler.ts:244–461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242 previousCacheEntry,
243 }) => {
244 const doRender = async () => {
245 try {
246 return await routeModule
247 .render(req, res, {
248 query:
249 hasStaticProps && !isExperimentalCompile
250 ? ({
251 ...params,
252 } as ParsedUrlQuery)
253 : {
254 ...query,
255 ...params,
256 },
257 params,
258 page: srcPage,
259 renderContext: {
260 isDraftMode,
261 isFallback: isIsrFallback,
262 developmentNotFoundSourcePage: getRequestMeta(
263 req,
264 'developmentNotFoundSourcePage'
265 ),
266 },
267 sharedContext: {
268 buildId,
269 customServer:
270 Boolean(routerServerContext?.isCustomServer) || undefined,
271 deploymentId,
272 clientAssetToken,
273 },
274 renderOpts: {
275 params,
276 routeModule,
277 page: srcPage,
278 pageConfig: config || {},
279 Component: interopDefault(userland),
280 ComponentMod: userland,
281 getStaticProps,
282 getStaticPaths,
283 getServerSideProps,
284 supportsDynamicResponse: !hasStaticProps,
285 buildManifest: isFallbackError
286 ? fallbackBuildManifest
287 : buildManifest,
288 nextFontManifest,
289 reactLoadableManifest,
290
291 assetPrefix: nextConfig.assetPrefix,
292 previewProps: prerenderManifest.preview,
293 images: nextConfig.images as any,
294 nextConfigOutput: nextConfig.output,
295 optimizeCss: Boolean(nextConfig.experimental.optimizeCss),
296 nextScriptWorkers: Boolean(
297 nextConfig.experimental.nextScriptWorkers
298 ),
299 domainLocales: nextConfig.i18n?.domains,
300 crossOrigin: nextConfig.crossOrigin,
301

Callers 1

responseGeneratorFunction · 0.70

Calls 15

getRequestMetaFunction · 0.90
interopDefaultFunction · 0.90
formatUrlFunction · 0.90
normalizeDataPathFunction · 0.90
getRevalidateReasonFunction · 0.90
finallyMethod · 0.80
thenMethod · 0.80
setAttributesMethod · 0.80
updateNameMethod · 0.80
onRequestErrorMethod · 0.80
renderMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected