diff --git a/e2e/react-start/basic/src/routeTree.gen.ts b/e2e/react-start/basic/src/routeTree.gen.ts index b6fc9282f6..c01a7c76f4 100644 --- a/e2e/react-start/basic/src/routeTree.gen.ts +++ b/e2e/react-start/basic/src/routeTree.gen.ts @@ -39,6 +39,7 @@ import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/ import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' import { Route as NotFoundViaLoaderRouteImport } from './routes/not-found/via-loader' +import { Route as NotFoundViaHeadRouteImport } from './routes/not-found/via-head' import { Route as NotFoundViaBeforeLoadRouteImport } from './routes/not-found/via-beforeLoad' import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index' @@ -170,6 +171,11 @@ const NotFoundViaLoaderRoute = NotFoundViaLoaderRouteImport.update({ path: '/via-loader', getParentRoute: () => NotFoundRouteRoute, } as any) +const NotFoundViaHeadRoute = NotFoundViaHeadRouteImport.update({ + id: '/via-head', + path: '/via-head', + getParentRoute: () => NotFoundRouteRoute, +} as any) const NotFoundViaBeforeLoadRoute = NotFoundViaBeforeLoadRouteImport.update({ id: '/via-beforeLoad', path: '/via-beforeLoad', @@ -271,6 +277,7 @@ export interface FileRoutesByFullPath { '/users': typeof UsersRouteWithChildren '/대한민국': typeof Char45824Char54620Char48124Char44397Route '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute + '/not-found/via-head': typeof NotFoundViaHeadRoute '/not-found/via-loader': typeof NotFoundViaLoaderRoute '/posts/$postId': typeof PostsPostIdRoute '/redirect/$target': typeof RedirectTargetRouteWithChildren @@ -303,6 +310,7 @@ export interface FileRoutesByTo { '/stream': typeof StreamRoute '/대한민국': typeof Char45824Char54620Char48124Char44397Route '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute + '/not-found/via-head': typeof NotFoundViaHeadRoute '/not-found/via-loader': typeof NotFoundViaLoaderRoute '/posts/$postId': typeof PostsPostIdRoute '/search-params/default': typeof SearchParamsDefaultRoute @@ -340,6 +348,7 @@ export interface FileRoutesById { '/대한민국': typeof Char45824Char54620Char48124Char44397Route '/_layout/_layout-2': typeof LayoutLayout2RouteWithChildren '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute + '/not-found/via-head': typeof NotFoundViaHeadRoute '/not-found/via-loader': typeof NotFoundViaLoaderRoute '/posts/$postId': typeof PostsPostIdRoute '/redirect/$target': typeof RedirectTargetRouteWithChildren @@ -379,6 +388,7 @@ export interface FileRouteTypes { | '/users' | '/대한민국' | '/not-found/via-beforeLoad' + | '/not-found/via-head' | '/not-found/via-loader' | '/posts/$postId' | '/redirect/$target' @@ -411,6 +421,7 @@ export interface FileRouteTypes { | '/stream' | '/대한민국' | '/not-found/via-beforeLoad' + | '/not-found/via-head' | '/not-found/via-loader' | '/posts/$postId' | '/search-params/default' @@ -447,6 +458,7 @@ export interface FileRouteTypes { | '/대한민국' | '/_layout/_layout-2' | '/not-found/via-beforeLoad' + | '/not-found/via-head' | '/not-found/via-loader' | '/posts/$postId' | '/redirect/$target' @@ -615,6 +627,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof NotFoundViaBeforeLoadRouteImport parentRoute: typeof NotFoundRouteRoute } + '/not-found/via-head': { + id: '/not-found/via-head' + path: '/via-head' + fullPath: '/not-found/via-head' + preLoaderRoute: typeof NotFoundViaHeadRouteImport + parentRoute: typeof NotFoundRouteRoute + } '/not-found/via-loader': { id: '/not-found/via-loader' path: '/via-loader' @@ -892,6 +911,13 @@ declare module '@tanstack/react-start/server' { preLoaderRoute: unknown parentRoute: typeof rootServerRouteImport } + '/not-found/via-head': { + id: '/not-found/via-head' + path: '/via-head' + fullPath: '/not-found/via-head' + preLoaderRoute: unknown + parentRoute: typeof rootServerRouteImport + } '/not-found/via-loader': { id: '/not-found/via-loader' path: '/via-loader' @@ -1301,6 +1327,23 @@ declare module './routes/not-found/via-beforeLoad' { unknown > } +declare module './routes/not-found/via-head' { + const createFileRoute: CreateFileRoute< + '/not-found/via-head', + FileRoutesByPath['/not-found/via-head']['parentRoute'], + FileRoutesByPath['/not-found/via-head']['id'], + FileRoutesByPath['/not-found/via-head']['path'], + FileRoutesByPath['/not-found/via-head']['fullPath'] + > + + const createServerFileRoute: CreateServerFileRoute< + ServerFileRoutesByPath['/not-found/via-head']['parentRoute'], + ServerFileRoutesByPath['/not-found/via-head']['id'], + ServerFileRoutesByPath['/not-found/via-head']['path'], + ServerFileRoutesByPath['/not-found/via-head']['fullPath'], + unknown + > +} declare module './routes/not-found/via-loader' { const createFileRoute: CreateFileRoute< '/not-found/via-loader', @@ -1712,12 +1755,14 @@ declare module './routes/foo/$bar/$qux/_here/index' { interface NotFoundRouteRouteChildren { NotFoundViaBeforeLoadRoute: typeof NotFoundViaBeforeLoadRoute + NotFoundViaHeadRoute: typeof NotFoundViaHeadRoute NotFoundViaLoaderRoute: typeof NotFoundViaLoaderRoute NotFoundIndexRoute: typeof NotFoundIndexRoute } const NotFoundRouteRouteChildren: NotFoundRouteRouteChildren = { NotFoundViaBeforeLoadRoute: NotFoundViaBeforeLoadRoute, + NotFoundViaHeadRoute: NotFoundViaHeadRoute, NotFoundViaLoaderRoute: NotFoundViaLoaderRoute, NotFoundIndexRoute: NotFoundIndexRoute, } diff --git a/e2e/react-start/basic/src/routes/not-found/index.tsx b/e2e/react-start/basic/src/routes/not-found/index.tsx index 7abe4a389f..3fcf91557b 100644 --- a/e2e/react-start/basic/src/routes/not-found/index.tsx +++ b/e2e/react-start/basic/src/routes/not-found/index.tsx @@ -25,6 +25,16 @@ export const Route = createFileRoute({ via-loader +