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

Function validateEntrypoint

packages/next/src/utils.ts:121–132  ·  view source on GitHub ↗

* Validate if the entrypoint is allowed to be used

(entrypoint: string)

Source from the content-addressed store, hash-verified

119 * Validate if the entrypoint is allowed to be used
120 */
121function validateEntrypoint(entrypoint: string) {
122 if (
123 !/package\.json$/.exec(entrypoint) &&
124 !/next\.config\.js$/.exec(entrypoint)
125 ) {
126 throw new NowBuildError({
127 message:
128 'Specified "src" for "@vercel/next" has to be "package.json" or "next.config.js"',
129 code: 'NEXT_INCORRECT_SRC',
130 });
131 }
132}
133
134/**
135 * Exclude certain files from the files object

Callers 2

utils.test.tsFile · 0.90
buildFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected