Skip to content

Commit 305ed47

Browse files
committed
Handle nested namespaces
1 parent 4611b26 commit 305ed47

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

codegen/lib/connect.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export const connect = (
4646

4747
routeIndexes[namespace.path] ??= new Set()
4848
routeIndexes[namespace.path]?.add(`${kebabCase(namespace.name)}.js`)
49+
50+
const parentPath = namespace.parentPath ?? ''
51+
routeIndexes[parentPath] ??= new Set()
52+
routeIndexes[parentPath]?.add(`${kebabCase(namespace.name)}/index.js`)
4953
}
5054

5155
for (const route of routes) {

0 commit comments

Comments
 (0)