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

Function shouldServe

packages/python/src/index.ts:1354–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352};
1353
1354export const shouldServe: ShouldServe = opts => {
1355 const framework = opts.config.framework;
1356 if (isPythonFramework(framework)) {
1357 const requestPath = opts.requestPath.replace(/\/$/, '');
1358 // Don't override API routes if another builder already matched them
1359 if (requestPath.startsWith('api') && opts.hasMatched) {
1360 return false;
1361 }
1362 // Public assets are served by the static builder / default handler
1363 return true;
1364 }
1365 return defaultShouldServe(opts);
1366};
1367
1368export const defaultShouldServe: ShouldServe = ({
1369 entrypoint,

Callers

nothing calls this directly

Calls 3

isPythonFrameworkFunction · 0.90
defaultShouldServeFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected