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

Function getClientBuildManifest

test/lib/next-test-utils.ts:1363–1372  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

1361}
1362
1363export function getClientBuildManifest(dir: string) {
1364 let buildId = readFileSync(path.join(dir, getDistDir(), 'BUILD_ID'), 'utf8')
1365 let code = readFileSync(
1366 path.join(dir, getDistDir(), 'static', buildId, '_buildManifest.js'),
1367 'utf8'
1368 )
1369 // eslint-disable-next-line no-eval
1370 let manifest = (0, eval)(`var self = global;${code};self.__BUILD_MANIFEST`)
1371 return manifest
1372}
1373
1374export function getClientBuildManifestLoaderChunkUrlPath(
1375 dir: string,

Calls 3

readFileSyncFunction · 0.85
getDistDirFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected