MCPcopy Create free account
hub / github.com/vercel/vercel / normalizeIndexOutput

Function normalizeIndexOutput

packages/next/src/utils.ts:3705–3713  ·  view source on GitHub ↗
(
  outputName: string,
  isServerMode: boolean
)

Source from the content-addressed store, hash-verified

3703 * the server mode is enabled.
3704 */
3705export function normalizeIndexOutput(
3706 outputName: string,
3707 isServerMode: boolean
3708) {
3709 if (outputName !== 'index' && outputName !== '/index' && isServerMode) {
3710 return outputName.replace(/\/index$/, '');
3711 }
3712 return outputName;
3713}
3714
3715/**
3716 * The path to next-server was changed in

Callers 4

serverBuildFunction · 0.90
buildFunction · 0.90
onPrerenderRouteFunction · 0.85
getMiddlewareBundleFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected