Skip to content

Commit 636c020

Browse files
committed
Fix index file path
1 parent 8aa76e5 commit 636c020

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

codegen/lib/connect.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export const connect = (
6969
const k =
7070
parentPath === ''
7171
? `${rootPath}/index.js`
72-
: `${rootPath}/${kebabCase(parentPath)}/index.js`
72+
: `${rootPath}${parentPath
73+
.split('/')
74+
.map((p) => kebabCase(p))
75+
.join('/')}/index.js`
7376
files[k] = { contents: Buffer.from('\n') }
7477
const file = files[k] as unknown as File
7578
file.layout = 'route-index.hbs'

0 commit comments

Comments
 (0)