Skip to content

Commit f46e142

Browse files
committed
fix: include app-dir files from app-paths-manifest.json
1 parent 41cb5b4 commit f46e142

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/runtime/src/helpers/functions.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,16 @@ export const getSSRLambdas = async (publish: string): Promise<SSRLambda[]> => {
411411
}
412412

413413
const getSSRRoutes = async (publish: string): Promise<RouteConfig[]> => {
414-
const pages = (await readJSON(join(publish, 'server', 'pages-manifest.json'))) as Record<string, string>
415-
const routes = Object.entries(pages).filter(
414+
const pageManifest = (await readJSON(join(publish, 'server', 'pages-manifest.json'))) as Record<string, string>
415+
const pageManifestRoutes = Object.entries(pageManifest).filter(
416416
([page, compiled]) => !page.startsWith('/api/') && !compiled.endsWith('.html'),
417417
)
418418

419+
const appPathsManifest: Record<string, string> = await readJSON(join(publish, 'server', 'app-paths-manifest.json'))
420+
const appRoutes = Object.entries(appPathsManifest)
421+
422+
const routes = [...pageManifestRoutes, ...appRoutes]
423+
419424
return await Promise.all(
420425
routes.map(async ([route, compiled]) => {
421426
const functionName = getFunctionNameForPage(route)

0 commit comments

Comments
 (0)