diff --git a/e2e/react-start/basic/package.json b/e2e/react-start/basic/package.json index df58e0ae22e..ae4d3939f5f 100644 --- a/e2e/react-start/basic/package.json +++ b/e2e/react-start/basic/package.json @@ -8,7 +8,9 @@ "dev:e2e": "vite dev", "build": "vite build && tsc --noEmit", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" + "test:e2e:spaMode": "rm -rf port*.txt; MODE=spa playwright test --project=chromium", + "test:e2e:ssrMode": "rm -rf port*.txt; playwright test --project=chromium", + "test:e2e": "pnpm run test:e2e:spaMode && pnpm run test:e2e:ssrMode" }, "dependencies": { "@tanstack/react-router": "workspace:^", diff --git a/e2e/react-start/basic/playwright.config.ts b/e2e/react-start/basic/playwright.config.ts index b0c365f8bd1..42b2938b328 100644 --- a/e2e/react-start/basic/playwright.config.ts +++ b/e2e/react-start/basic/playwright.config.ts @@ -3,19 +3,22 @@ import { getDummyServerPort, getTestServerPort, } from '@tanstack/router-e2e-utils' +import { isSpaMode } from 'tests/utils/isSpaMode' import packageJson from './package.json' with { type: 'json' } const PORT = await getTestServerPort(packageJson.name) const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` +const spaModeCommand = `pnpm build && pnpm dev:e2e --port=${PORT}` +const ssrModeCommand = `pnpm build && pnpm start` +console.log('running in spa mode: ', isSpaMode.toString()) /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './tests', workers: 1, - reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', @@ -27,16 +30,25 @@ export default defineConfig({ }, webServer: { - command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, + command: isSpaMode ? spaModeCommand : ssrModeCommand, url: baseURL, reuseExistingServer: !process.env.CI, stdout: 'pipe', + env: { + MODE: process.env.MODE || '', + VITE_NODE_ENV: 'test', + VITE_EXTERNAL_PORT: String(EXTERNAL_PORT), + VITE_SERVER_PORT: String(PORT), + PORT: String(PORT), + }, }, projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + use: { + ...devices['Desktop Chrome'], + }, }, ], }) diff --git a/e2e/react-start/basic/src/routeTree.gen.ts b/e2e/react-start/basic/src/routeTree.gen.ts index a88d7953940..e29bb26d3ce 100644 --- a/e2e/react-start/basic/src/routeTree.gen.ts +++ b/e2e/react-start/basic/src/routeTree.gen.ts @@ -9,7 +9,6 @@ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import { createFileRoute } from '@tanstack/react-router' -import type { CreateFileRoute, FileRoutesByPath } from '@tanstack/react-router' import { Route as rootRouteImport } from './routes/__root' import { Route as Char45824Char54620Char48124Char44397RouteImport } from './routes/대한민국' @@ -548,11 +547,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/inline-scripts': { - id: '/inline-scripts' - path: '/inline-scripts' - fullPath: '/inline-scripts' - preLoaderRoute: typeof InlineScriptsRouteImport + '/links': { + id: '/links' + path: '/links' + fullPath: '/links' + preLoaderRoute: typeof LinksRouteImport parentRoute: typeof rootRouteImport } '/inline-scripts': { @@ -562,13 +561,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof InlineScriptsRouteImport parentRoute: typeof rootRouteImport } - '/links': { - id: '/links' - path: '/links' - fullPath: '/links' - preLoaderRoute: typeof LinksRouteImport - parentRoute: typeof rootRouteImport - } '/deferred': { id: '/deferred' path: '/deferred' @@ -785,254 +777,6 @@ declare module '@tanstack/react-router' { fullPath: '/redirect/$target/serverFn/via-beforeLoad' preLoaderRoute: typeof RedirectTargetServerFnViaBeforeLoadRouteImport parentRoute: typeof RedirectTargetRoute - '/foo/$bar/$qux/_here/': { - id: '/foo/$bar/$qux/_here/' - path: '/' - fullPath: '/foo/$bar/$qux/' - preLoaderRoute: typeof FooBarQuxHereIndexRouteImport - parentRoute: typeof FooBarQuxHereRoute - } - '/foo/$bar/$qux': { - id: '/foo/$bar/$qux' - path: '/foo/$bar/$qux' - fullPath: '/foo/$bar/$qux' - preLoaderRoute: typeof FooBarQuxRouteImport - parentRoute: typeof rootRouteImport - } - } -} -declare module '@tanstack/react-start/server' { - interface ServerFileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/not-found': { - id: '/not-found' - path: '/not-found' - fullPath: '/not-found' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/search-params': { - id: '/search-params' - path: '/search-params' - fullPath: '/search-params' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/inline-scripts': { - id: '/inline-scripts' - path: '/inline-scripts' - fullPath: '/inline-scripts' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/links': { - id: '/links' - path: '/links' - fullPath: '/links' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/scripts': { - id: '/scripts' - path: '/scripts' - fullPath: '/scripts' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/stream': { - id: '/stream' - path: '/stream' - fullPath: '/stream' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/대한민국': { - id: '/대한민국' - path: '/대한민국' - fullPath: '/대한민국' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' - fullPath: '' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersServerRouteImport - parentRoute: typeof rootServerRouteImport - } - '/not-found/via-beforeLoad': { - id: '/not-found/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/not-found/via-beforeLoad' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/not-found/via-loader': { - id: '/not-found/via-loader' - path: '/via-loader' - fullPath: '/not-found/via-loader' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/redirect/$target': { - id: '/redirect/$target' - path: '/redirect/$target' - fullPath: '/redirect/$target' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/search-params/default': { - id: '/search-params/default' - path: '/default' - fullPath: '/search-params/default' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/search-params/loader-throws-redirect': { - id: '/search-params/loader-throws-redirect' - path: '/loader-throws-redirect' - fullPath: '/search-params/loader-throws-redirect' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/not-found/': { - id: '/not-found/' - path: '/' - fullPath: '/not-found/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/search-params/': { - id: '/search-params/' - path: '/' - fullPath: '/search-params/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/api/users/$id': { - id: '/api/users/$id' - path: '/$id' - fullPath: '/api/users/$id' - preLoaderRoute: typeof ApiUsersIdServerRouteImport - parentRoute: typeof ApiUsersServerRoute - } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/redirect/$target/via-beforeLoad': { - id: '/redirect/$target/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/redirect/$target/via-beforeLoad' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/redirect/$target/via-loader': { - id: '/redirect/$target/via-loader' - path: '/via-loader' - fullPath: '/redirect/$target/via-loader' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport - } - '/redirect/$target/': { - id: '/redirect/$target/' - path: '/' - fullPath: '/redirect/$target/' - preLoaderRoute: unknown - parentRoute: typeof rootServerRouteImport } '/foo/$bar/$qux/_here': { id: '/foo/$bar/$qux/_here' @@ -1051,374 +795,6 @@ declare module '@tanstack/react-start/server' { } } -declare module './routes/index' { - const createFileRoute: CreateFileRoute< - '/', - FileRoutesByPath['/']['parentRoute'], - FileRoutesByPath['/']['id'], - FileRoutesByPath['/']['path'], - FileRoutesByPath['/']['fullPath'] - > -} -declare module './routes/not-found/route' { - const createFileRoute: CreateFileRoute< - '/not-found', - FileRoutesByPath['/not-found']['parentRoute'], - FileRoutesByPath['/not-found']['id'], - FileRoutesByPath['/not-found']['path'], - FileRoutesByPath['/not-found']['fullPath'] - > -} -declare module './routes/search-params/route' { - const createFileRoute: CreateFileRoute< - '/search-params', - FileRoutesByPath['/search-params']['parentRoute'], - FileRoutesByPath['/search-params']['id'], - FileRoutesByPath['/search-params']['path'], - FileRoutesByPath['/search-params']['fullPath'] - > -} -declare module './routes/_layout' { - const createFileRoute: CreateFileRoute< - '/_layout', - FileRoutesByPath['/_layout']['parentRoute'], - FileRoutesByPath['/_layout']['id'], - FileRoutesByPath['/_layout']['path'], - FileRoutesByPath['/_layout']['fullPath'] - > -} -declare module './routes/deferred' { - const createFileRoute: CreateFileRoute< - '/deferred', - FileRoutesByPath['/deferred']['parentRoute'], - FileRoutesByPath['/deferred']['id'], - FileRoutesByPath['/deferred']['path'], - FileRoutesByPath['/deferred']['fullPath'] - > - - const createServerFileRoute: CreateServerFileRoute< - ServerFileRoutesByPath['/deferred']['parentRoute'], - ServerFileRoutesByPath['/deferred']['id'], - ServerFileRoutesByPath['/deferred']['path'], - ServerFileRoutesByPath['/deferred']['fullPath'], - unknown - > -} -declare module './routes/inline-scripts' { - const createFileRoute: CreateFileRoute< - '/inline-scripts', - FileRoutesByPath['/inline-scripts']['parentRoute'], - FileRoutesByPath['/inline-scripts']['id'], - FileRoutesByPath['/inline-scripts']['path'], - FileRoutesByPath['/inline-scripts']['fullPath'] - > - - const createServerFileRoute: CreateServerFileRoute< - ServerFileRoutesByPath['/inline-scripts']['parentRoute'], - ServerFileRoutesByPath['/inline-scripts']['id'], - ServerFileRoutesByPath['/inline-scripts']['path'], - ServerFileRoutesByPath['/inline-scripts']['fullPath'], - unknown - > -} -declare module './routes/links' { - const createFileRoute: CreateFileRoute< - '/links', - FileRoutesByPath['/links']['parentRoute'], - FileRoutesByPath['/links']['id'], - FileRoutesByPath['/links']['path'], - FileRoutesByPath['/links']['fullPath'] - > -} -declare module './routes/posts' { - const createFileRoute: CreateFileRoute< - '/posts', - FileRoutesByPath['/posts']['parentRoute'], - FileRoutesByPath['/posts']['id'], - FileRoutesByPath['/posts']['path'], - FileRoutesByPath['/posts']['fullPath'] - > -} -declare module './routes/scripts' { - const createFileRoute: CreateFileRoute< - '/scripts', - FileRoutesByPath['/scripts']['parentRoute'], - FileRoutesByPath['/scripts']['id'], - FileRoutesByPath['/scripts']['path'], - FileRoutesByPath['/scripts']['fullPath'] - > -} -declare module './routes/stream' { - const createFileRoute: CreateFileRoute< - '/stream', - FileRoutesByPath['/stream']['parentRoute'], - FileRoutesByPath['/stream']['id'], - FileRoutesByPath['/stream']['path'], - FileRoutesByPath['/stream']['fullPath'] - > -} -declare module './routes/users' { - const createFileRoute: CreateFileRoute< - '/users', - FileRoutesByPath['/users']['parentRoute'], - FileRoutesByPath['/users']['id'], - FileRoutesByPath['/users']['path'], - FileRoutesByPath['/users']['fullPath'] - > -} -declare module './routes/대한민국' { - const createFileRoute: CreateFileRoute< - '/대한민국', - FileRoutesByPath['/대한민국']['parentRoute'], - FileRoutesByPath['/대한민국']['id'], - FileRoutesByPath['/대한민국']['path'], - FileRoutesByPath['/대한민국']['fullPath'] - > -} -declare module './routes/_layout/_layout-2' { - const createFileRoute: CreateFileRoute< - '/_layout/_layout-2', - FileRoutesByPath['/_layout/_layout-2']['parentRoute'], - FileRoutesByPath['/_layout/_layout-2']['id'], - FileRoutesByPath['/_layout/_layout-2']['path'], - FileRoutesByPath['/_layout/_layout-2']['fullPath'] - > -} -declare module './routes/api.users' { - const createFileRoute: CreateFileRoute< - '/api/users', - FileRoutesByPath['/api/users']['parentRoute'], - FileRoutesByPath['/api/users']['id'], - FileRoutesByPath['/api/users']['path'], - FileRoutesByPath['/api/users']['fullPath'] - > -} -declare module './routes/not-found/via-beforeLoad' { - const createFileRoute: CreateFileRoute< - '/not-found/via-beforeLoad', - FileRoutesByPath['/not-found/via-beforeLoad']['parentRoute'], - FileRoutesByPath['/not-found/via-beforeLoad']['id'], - FileRoutesByPath['/not-found/via-beforeLoad']['path'], - FileRoutesByPath['/not-found/via-beforeLoad']['fullPath'] - > -} -declare module './routes/not-found/via-loader' { - const createFileRoute: CreateFileRoute< - '/not-found/via-loader', - FileRoutesByPath['/not-found/via-loader']['parentRoute'], - FileRoutesByPath['/not-found/via-loader']['id'], - FileRoutesByPath['/not-found/via-loader']['path'], - FileRoutesByPath['/not-found/via-loader']['fullPath'] - > -} -declare module './routes/posts.$postId' { - const createFileRoute: CreateFileRoute< - '/posts/$postId', - FileRoutesByPath['/posts/$postId']['parentRoute'], - FileRoutesByPath['/posts/$postId']['id'], - FileRoutesByPath['/posts/$postId']['path'], - FileRoutesByPath['/posts/$postId']['fullPath'] - > -} -declare module './routes/redirect/$target' { - const createFileRoute: CreateFileRoute< - '/redirect/$target', - FileRoutesByPath['/redirect/$target']['parentRoute'], - FileRoutesByPath['/redirect/$target']['id'], - FileRoutesByPath['/redirect/$target']['path'], - FileRoutesByPath['/redirect/$target']['fullPath'] - > -} -declare module './routes/search-params/default' { - const createFileRoute: CreateFileRoute< - '/search-params/default', - FileRoutesByPath['/search-params/default']['parentRoute'], - FileRoutesByPath['/search-params/default']['id'], - FileRoutesByPath['/search-params/default']['path'], - FileRoutesByPath['/search-params/default']['fullPath'] - > -} -declare module './routes/search-params/loader-throws-redirect' { - const createFileRoute: CreateFileRoute< - '/search-params/loader-throws-redirect', - FileRoutesByPath['/search-params/loader-throws-redirect']['parentRoute'], - FileRoutesByPath['/search-params/loader-throws-redirect']['id'], - FileRoutesByPath['/search-params/loader-throws-redirect']['path'], - FileRoutesByPath['/search-params/loader-throws-redirect']['fullPath'] - > -} -declare module './routes/users.$userId' { - const createFileRoute: CreateFileRoute< - '/users/$userId', - FileRoutesByPath['/users/$userId']['parentRoute'], - FileRoutesByPath['/users/$userId']['id'], - FileRoutesByPath['/users/$userId']['path'], - FileRoutesByPath['/users/$userId']['fullPath'] - > -} -declare module './routes/not-found/index' { - const createFileRoute: CreateFileRoute< - '/not-found/', - FileRoutesByPath['/not-found/']['parentRoute'], - FileRoutesByPath['/not-found/']['id'], - FileRoutesByPath['/not-found/']['path'], - FileRoutesByPath['/not-found/']['fullPath'] - > -} -declare module './routes/posts.index' { - const createFileRoute: CreateFileRoute< - '/posts/', - FileRoutesByPath['/posts/']['parentRoute'], - FileRoutesByPath['/posts/']['id'], - FileRoutesByPath['/posts/']['path'], - FileRoutesByPath['/posts/']['fullPath'] - > -} -declare module './routes/redirect/index' { - const createFileRoute: CreateFileRoute< - '/redirect/', - FileRoutesByPath['/redirect/']['parentRoute'], - FileRoutesByPath['/redirect/']['id'], - FileRoutesByPath['/redirect/']['path'], - FileRoutesByPath['/redirect/']['fullPath'] - > -} -declare module './routes/search-params/index' { - const createFileRoute: CreateFileRoute< - '/search-params/', - FileRoutesByPath['/search-params/']['parentRoute'], - FileRoutesByPath['/search-params/']['id'], - FileRoutesByPath['/search-params/']['path'], - FileRoutesByPath['/search-params/']['fullPath'] - > -} -declare module './routes/users.index' { - const createFileRoute: CreateFileRoute< - '/users/', - FileRoutesByPath['/users/']['parentRoute'], - FileRoutesByPath['/users/']['id'], - FileRoutesByPath['/users/']['path'], - FileRoutesByPath['/users/']['fullPath'] - > -} -declare module './routes/_layout/_layout-2/layout-a' { - const createFileRoute: CreateFileRoute< - '/_layout/_layout-2/layout-a', - FileRoutesByPath['/_layout/_layout-2/layout-a']['parentRoute'], - FileRoutesByPath['/_layout/_layout-2/layout-a']['id'], - FileRoutesByPath['/_layout/_layout-2/layout-a']['path'], - FileRoutesByPath['/_layout/_layout-2/layout-a']['fullPath'] - > -} -declare module './routes/_layout/_layout-2/layout-b' { - const createFileRoute: CreateFileRoute< - '/_layout/_layout-2/layout-b', - FileRoutesByPath['/_layout/_layout-2/layout-b']['parentRoute'], - FileRoutesByPath['/_layout/_layout-2/layout-b']['id'], - FileRoutesByPath['/_layout/_layout-2/layout-b']['path'], - FileRoutesByPath['/_layout/_layout-2/layout-b']['fullPath'] - > -} -declare module './routes/api/users.$id' { - const createFileRoute: CreateFileRoute< - '/api/users/$id', - FileRoutesByPath['/api/users/$id']['parentRoute'], - FileRoutesByPath['/api/users/$id']['id'], - FileRoutesByPath['/api/users/$id']['path'], - FileRoutesByPath['/api/users/$id']['fullPath'] - > -} -declare module './routes/posts_.$postId.deep' { - const createFileRoute: CreateFileRoute< - '/posts_/$postId/deep', - FileRoutesByPath['/posts_/$postId/deep']['parentRoute'], - FileRoutesByPath['/posts_/$postId/deep']['id'], - FileRoutesByPath['/posts_/$postId/deep']['path'], - FileRoutesByPath['/posts_/$postId/deep']['fullPath'] - > -} -declare module './routes/redirect/$target/via-beforeLoad' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/via-beforeLoad', - FileRoutesByPath['/redirect/$target/via-beforeLoad']['parentRoute'], - FileRoutesByPath['/redirect/$target/via-beforeLoad']['id'], - FileRoutesByPath['/redirect/$target/via-beforeLoad']['path'], - FileRoutesByPath['/redirect/$target/via-beforeLoad']['fullPath'] - > -} -declare module './routes/redirect/$target/via-loader' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/via-loader', - FileRoutesByPath['/redirect/$target/via-loader']['parentRoute'], - FileRoutesByPath['/redirect/$target/via-loader']['id'], - FileRoutesByPath['/redirect/$target/via-loader']['path'], - FileRoutesByPath['/redirect/$target/via-loader']['fullPath'] - > -} -declare module './routes/redirect/$target/index' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/', - FileRoutesByPath['/redirect/$target/']['parentRoute'], - FileRoutesByPath['/redirect/$target/']['id'], - FileRoutesByPath['/redirect/$target/']['path'], - FileRoutesByPath['/redirect/$target/']['fullPath'] - > -} -declare module './routes/foo/$bar/$qux/_here' { - const createFileRoute: CreateFileRoute< - '/foo/$bar/$qux/_here', - FileRoutesByPath['/foo/$bar/$qux/_here']['parentRoute'], - FileRoutesByPath['/foo/$bar/$qux/_here']['id'], - FileRoutesByPath['/foo/$bar/$qux/_here']['path'], - FileRoutesByPath['/foo/$bar/$qux/_here']['fullPath'] - > -} -declare module './routes/redirect/$target/serverFn/via-beforeLoad' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/serverFn/via-beforeLoad', - FileRoutesByPath['/redirect/$target/serverFn/via-beforeLoad']['parentRoute'], - FileRoutesByPath['/redirect/$target/serverFn/via-beforeLoad']['id'], - FileRoutesByPath['/redirect/$target/serverFn/via-beforeLoad']['path'], - FileRoutesByPath['/redirect/$target/serverFn/via-beforeLoad']['fullPath'] - > -} -declare module './routes/redirect/$target/serverFn/via-loader' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/serverFn/via-loader', - FileRoutesByPath['/redirect/$target/serverFn/via-loader']['parentRoute'], - FileRoutesByPath['/redirect/$target/serverFn/via-loader']['id'], - FileRoutesByPath['/redirect/$target/serverFn/via-loader']['path'], - FileRoutesByPath['/redirect/$target/serverFn/via-loader']['fullPath'] - > -} -declare module './routes/redirect/$target/serverFn/via-useServerFn' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/serverFn/via-useServerFn', - FileRoutesByPath['/redirect/$target/serverFn/via-useServerFn']['parentRoute'], - FileRoutesByPath['/redirect/$target/serverFn/via-useServerFn']['id'], - FileRoutesByPath['/redirect/$target/serverFn/via-useServerFn']['path'], - FileRoutesByPath['/redirect/$target/serverFn/via-useServerFn']['fullPath'] - > -} -declare module './routes/redirect/$target/serverFn/index' { - const createFileRoute: CreateFileRoute< - '/redirect/$target/serverFn/', - FileRoutesByPath['/redirect/$target/serverFn/']['parentRoute'], - FileRoutesByPath['/redirect/$target/serverFn/']['id'], - FileRoutesByPath['/redirect/$target/serverFn/']['path'], - FileRoutesByPath['/redirect/$target/serverFn/']['fullPath'] - > -} -declare module './routes/foo/$bar/$qux/_here/index' { - const createFileRoute: CreateFileRoute< - '/foo/$bar/$qux/_here/', - FileRoutesByPath['/foo/$bar/$qux/_here/']['parentRoute'], - FileRoutesByPath['/foo/$bar/$qux/_here/']['id'], - FileRoutesByPath['/foo/$bar/$qux/_here/']['path'], - FileRoutesByPath['/foo/$bar/$qux/_here/']['fullPath'] - > -} - interface NotFoundRouteRouteChildren { NotFoundViaBeforeLoadRoute: typeof NotFoundViaBeforeLoadRoute NotFoundViaLoaderRoute: typeof NotFoundViaLoaderRoute diff --git a/e2e/react-start/basic/src/routes/__root.tsx b/e2e/react-start/basic/src/routes/__root.tsx index 9c3a7138b0e..c7d87cad188 100644 --- a/e2e/react-start/basic/src/routes/__root.tsx +++ b/e2e/react-start/basic/src/routes/__root.tsx @@ -178,7 +178,9 @@ function RootDocument({ children }: { children: React.ReactNode }) {