diff --git a/packages/utils/src/route-builder.ts b/packages/utils/src/route-builder.ts index 832063f7a..c617d86f0 100644 --- a/packages/utils/src/route-builder.ts +++ b/packages/utils/src/route-builder.ts @@ -1,5 +1,4 @@ import { get, omit } from "es-toolkit/compat" -import { Fragment } from "react/jsx-runtime" import type { RouteObject } from "react-router" type NestedStructure = { [key: string]: NestedStructure } @@ -85,7 +84,7 @@ export function buildGlobRoutes(glob: Record Promise>): Route if (isGroupedRoute) { const accessPath = `${segmentPathKey}/layout.tsx` - const globGetter = get(glob, accessPath) || (() => Fragment) + const globGetter = get(glob, accessPath) || undefined if (pathGetterSet.has(accessPath)) { // throw new Error(`duplicate path: ` + accessPath)