UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

18 lines (17 loc) 646 B
function findRootLayout(routes, routerRoot) { const exactKey = `/${routerRoot}/_layout.tsx`; if (routes[exactKey]) return routes[exactKey](); for (const suffix of ["+ssg", "+ssr", "+spa"]) { const key = `/${routerRoot}/_layout${suffix}.tsx`; if (routes[key]) return routes[key](); } const exactKeyTs = `/${routerRoot}/_layout.ts`; if (routes[exactKeyTs]) return routes[exactKeyTs](); for (const suffix of ["+ssg", "+ssr", "+spa"]) { const key = `/${routerRoot}/_layout${suffix}.ts`; if (routes[key]) return routes[key](); } return void 0; } export { findRootLayout }; //# sourceMappingURL=findRootLayout.mjs.map