Skip to content

Commit e55836d

Browse files
committed
fix
1 parent bc0a9f0 commit e55836d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vite/plugin.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
112112
...recursiveFlatten(
113113
routeOrRoutes.children.map((child) => {
114114
const withoutExtension = child.file.split(".").slice(0, -1).join(".")
115+
const withoutExtensionParent = routeOrRoutes.file.split(".").slice(0, -1).join(".")
115116
// remove the trailing ./ and ../
116117
const withoutRelative = withoutExtension.replace(/^\.\//, "").replace(/^\.\.\//, "")
117118
return {
118119
...child,
119120
id: child.id ?? withoutRelative,
120-
parentId: withoutExtension,
121+
parentId: withoutExtensionParent,
121122
}
122123
})
123124
),

0 commit comments

Comments
 (0)