Skip to content

Commit 5823124

Browse files
authored
fix: take the appDirectory into account when generating types (#12190)
* fix: take the `appDirectory` into account when generating types * chore: signing the CLA
1 parent 8a5cf09 commit 5823124

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
- promet99
219219
- pyitphyoaung
220220
- refusado
221+
- rifaidev
221222
- rimian
222223
- robbtraister
223224
- RobHannay

packages/react-router-dev/typescript/typegen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function getDirectory(ctx: Context) {
2828
export function getPath(ctx: Context, route: RouteManifestEntry): string {
2929
return Path.join(
3030
getDirectory(ctx),
31-
Path.basename(ctx.appDirectory),
31+
Path.relative(ctx.rootDirectory, ctx.appDirectory),
3232
Path.dirname(route.file),
3333
"+types." + Pathe.filename(route.file) + ".d.ts"
3434
);

0 commit comments

Comments
 (0)