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

Function buildNextjsWrapper

packages/next/scripts/build-edge-function-template.js:26–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26async function buildNextjsWrapper() {
27 const { outputFiles } = await buildTemplate({
28 entryPoints: ['./src/edge-function-source/get-edge-function'],
29 outfile: 'dist/___get-nextjs-edge-function.js',
30 format: 'cjs', // https://esbuild.github.io/api/#format
31 write: false,
32 });
33
34 assert(outputFiles);
35 const [src] = outputFiles;
36
37 return outputFile(src.path, `module.exports = ${JSON.stringify(src.text)}`);
38}
39
40module.exports = buildNextjsWrapper;

Callers

nothing calls this directly

Calls 2

buildTemplateFunction · 0.85
assertFunction · 0.85

Tested by

no test coverage detected