Skip to content

Commit c620c8f

Browse files
fix: unrendered root index: true
1 parent 0cc3119 commit c620c8f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/node/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export async function routesToPaths(routes?: Readonly<RouteRecord[]>) {
5959
if (route.index)
6060
addEntry(prefix, route.entry)
6161

62+
if (route.index && !path) {
63+
addEntry('/', route.entry)
64+
paths.add('/')
65+
}
66+
6267
if (Array.isArray(route.children))
6368
await getPaths(route.children, path)
6469
}

0 commit comments

Comments
 (0)