mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
[next] Ensure app functions are detected/separated properly (#9989)
Follow-up to https://github.com/vercel/vercel/pull/9974 this uses the `lambdaAppPaths` as the source of truth instead of the manifest which is more accurate for separating/detecting. Also adds additional test cases for new root and index app functions. x-ref: https://github.com/vercel/next.js/issues/49169
This commit is contained in:
5
.changeset/tiny-melons-bow.md
Normal file
5
.changeset/tiny-melons-bow.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@vercel/next": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
[next] Ensure app functions are detected/separated properly
|
||||||
@@ -407,14 +407,10 @@ export async function serverBuild({
|
|||||||
dynamicPages.push(normalizedPathname);
|
dynamicPages.push(normalizedPathname);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pageMatchesApi(page)) {
|
if (lambdaAppPaths[page]) {
|
||||||
apiPages.push(page);
|
|
||||||
} else if (
|
|
||||||
(appPathRoutesManifest?.[`${normalizedPathname}/page`] ||
|
|
||||||
appPathRoutesManifest?.[`${normalizedPathname}/route`]) &&
|
|
||||||
lambdaAppPaths[page]
|
|
||||||
) {
|
|
||||||
appRouterPages.push(page);
|
appRouterPages.push(page);
|
||||||
|
} else if (pageMatchesApi(page)) {
|
||||||
|
apiPages.push(page);
|
||||||
} else {
|
} else {
|
||||||
nonApiPages.push(page);
|
nonApiPages.push(page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
export const dynamic = 'force-dynamic'
|
||||||
|
|
||||||
export default function HelloPage(props) {
|
export default function HelloPage(props) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
export const dynamic = 'force-dynamic'
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <p>index app page</p>;
|
return <p>index app page {Date.now()}</p>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"probes": [
|
"probes": [
|
||||||
|
{
|
||||||
|
"path": "/dashboard/hello",
|
||||||
|
"status": 200,
|
||||||
|
"mustContain": "hello from app/dashboard/rootonly/hello"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "/dashboard/another-edge",
|
"path": "/dashboard/another-edge",
|
||||||
"status": 200,
|
"status": 200,
|
||||||
|
|||||||
Reference in New Issue
Block a user