We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 923686f commit 5bce87dCopy full SHA for 5bce87d
1 file changed
codegen/lib/connect.ts
@@ -59,6 +59,14 @@ export const connect = (
59
const parentPath = route.parentPath ?? ''
60
routeIndexes[parentPath] ??= new Set()
61
routeIndexes[parentPath]?.add(`${kebabCase(route.name)}.js`)
62
+
63
+ const hasChildren = routes.some(
64
+ ({ path }) => path.startsWith(route.path) && path !== route.path,
65
+ )
66
+ if (hasChildren) {
67
+ routeIndexes[parentPath] ??= new Set()
68
+ routeIndexes[parentPath]?.add(`${kebabCase(route.name)}/index.js`)
69
+ }
70
}
71
72
for (const [parentPath, routes] of Object.entries(routeIndexes)) {
0 commit comments