Skip to content

Commit 13a6751

Browse files
committed
fix(tanstack-start-rsc): missing deps
1 parent 407bdf7 commit 13a6751

5 files changed

Lines changed: 105 additions & 90 deletions

File tree

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ components.d.ts
88
**/@mf-types
99
**/http-import.lock.data
1010
**/__snapshots__
11+
routeTree.gen.ts

pnpm-lock.yaml

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rsbuild/tanstack-start-rsc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@types/node": "22.10.2",
2525
"@types/react": "^19.2.2",
2626
"@types/react-dom": "^19.2.2",
27+
"srvx": "^0.11.16",
2728
"tailwindcss": "^4.1.18",
2829
"typescript": "^6.0.3"
2930
}

rsbuild/tanstack-start-rsc/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path';
33
import { spawn } from 'node:child_process';
44
import { pathToFileURL } from 'node:url';
55

6-
const distDir = process.env.E2E_DIST_DIR || 'dist';
6+
const distDir = 'dist';
77

88
function resolveDistClientDir() {
99
return path.resolve(distDir, 'client');

rsbuild/tanstack-start-rsc/src/routeTree.gen.ts

Lines changed: 98 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -8,138 +8,150 @@
88
// You should NOT make any changes in this file as it will be overwritten.
99
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
1010

11-
import { Route as rootRouteImport } from './routes/__root';
12-
import { Route as PokemonRscRouteImport } from './routes/pokemon-rsc';
13-
import { Route as PokemonRouteImport } from './routes/pokemon';
14-
import { Route as LowLevelApiRouteImport } from './routes/low-level-api';
15-
import { Route as ECommerceRouteImport } from './routes/e-commerce';
16-
import { Route as IndexRouteImport } from './routes/index';
17-
import { Route as ApiRscRouteImport } from './routes/api/rsc';
11+
import { Route as rootRouteImport } from './routes/__root'
12+
import { Route as PokemonRscRouteImport } from './routes/pokemon-rsc'
13+
import { Route as PokemonRouteImport } from './routes/pokemon'
14+
import { Route as LowLevelApiRouteImport } from './routes/low-level-api'
15+
import { Route as ECommerceRouteImport } from './routes/e-commerce'
16+
import { Route as IndexRouteImport } from './routes/index'
17+
import { Route as ApiRscRouteImport } from './routes/api/rsc'
1818

1919
const PokemonRscRoute = PokemonRscRouteImport.update({
2020
id: '/pokemon-rsc',
2121
path: '/pokemon-rsc',
2222
getParentRoute: () => rootRouteImport,
23-
} as any);
23+
} as any)
2424
const PokemonRoute = PokemonRouteImport.update({
2525
id: '/pokemon',
2626
path: '/pokemon',
2727
getParentRoute: () => rootRouteImport,
28-
} as any);
28+
} as any)
2929
const LowLevelApiRoute = LowLevelApiRouteImport.update({
3030
id: '/low-level-api',
3131
path: '/low-level-api',
3232
getParentRoute: () => rootRouteImport,
33-
} as any);
33+
} as any)
3434
const ECommerceRoute = ECommerceRouteImport.update({
3535
id: '/e-commerce',
3636
path: '/e-commerce',
3737
getParentRoute: () => rootRouteImport,
38-
} as any);
38+
} as any)
3939
const IndexRoute = IndexRouteImport.update({
4040
id: '/',
4141
path: '/',
4242
getParentRoute: () => rootRouteImport,
43-
} as any);
43+
} as any)
4444
const ApiRscRoute = ApiRscRouteImport.update({
4545
id: '/api/rsc',
4646
path: '/api/rsc',
4747
getParentRoute: () => rootRouteImport,
48-
} as any);
48+
} as any)
4949

5050
export interface FileRoutesByFullPath {
51-
'/': typeof IndexRoute;
52-
'/e-commerce': typeof ECommerceRoute;
53-
'/low-level-api': typeof LowLevelApiRoute;
54-
'/pokemon': typeof PokemonRoute;
55-
'/pokemon-rsc': typeof PokemonRscRoute;
56-
'/api/rsc': typeof ApiRscRoute;
51+
'/': typeof IndexRoute
52+
'/e-commerce': typeof ECommerceRoute
53+
'/low-level-api': typeof LowLevelApiRoute
54+
'/pokemon': typeof PokemonRoute
55+
'/pokemon-rsc': typeof PokemonRscRoute
56+
'/api/rsc': typeof ApiRscRoute
5757
}
5858
export interface FileRoutesByTo {
59-
'/': typeof IndexRoute;
60-
'/e-commerce': typeof ECommerceRoute;
61-
'/low-level-api': typeof LowLevelApiRoute;
62-
'/pokemon': typeof PokemonRoute;
63-
'/pokemon-rsc': typeof PokemonRscRoute;
64-
'/api/rsc': typeof ApiRscRoute;
59+
'/': typeof IndexRoute
60+
'/e-commerce': typeof ECommerceRoute
61+
'/low-level-api': typeof LowLevelApiRoute
62+
'/pokemon': typeof PokemonRoute
63+
'/pokemon-rsc': typeof PokemonRscRoute
64+
'/api/rsc': typeof ApiRscRoute
6565
}
6666
export interface FileRoutesById {
67-
__root__: typeof rootRouteImport;
68-
'/': typeof IndexRoute;
69-
'/e-commerce': typeof ECommerceRoute;
70-
'/low-level-api': typeof LowLevelApiRoute;
71-
'/pokemon': typeof PokemonRoute;
72-
'/pokemon-rsc': typeof PokemonRscRoute;
73-
'/api/rsc': typeof ApiRscRoute;
67+
__root__: typeof rootRouteImport
68+
'/': typeof IndexRoute
69+
'/e-commerce': typeof ECommerceRoute
70+
'/low-level-api': typeof LowLevelApiRoute
71+
'/pokemon': typeof PokemonRoute
72+
'/pokemon-rsc': typeof PokemonRscRoute
73+
'/api/rsc': typeof ApiRscRoute
7474
}
7575
export interface FileRouteTypes {
76-
fileRoutesByFullPath: FileRoutesByFullPath;
77-
fullPaths: '/' | '/e-commerce' | '/low-level-api' | '/pokemon' | '/pokemon-rsc' | '/api/rsc';
78-
fileRoutesByTo: FileRoutesByTo;
79-
to: '/' | '/e-commerce' | '/low-level-api' | '/pokemon' | '/pokemon-rsc' | '/api/rsc';
76+
fileRoutesByFullPath: FileRoutesByFullPath
77+
fullPaths:
78+
| '/'
79+
| '/e-commerce'
80+
| '/low-level-api'
81+
| '/pokemon'
82+
| '/pokemon-rsc'
83+
| '/api/rsc'
84+
fileRoutesByTo: FileRoutesByTo
85+
to:
86+
| '/'
87+
| '/e-commerce'
88+
| '/low-level-api'
89+
| '/pokemon'
90+
| '/pokemon-rsc'
91+
| '/api/rsc'
8092
id:
8193
| '__root__'
8294
| '/'
8395
| '/e-commerce'
8496
| '/low-level-api'
8597
| '/pokemon'
8698
| '/pokemon-rsc'
87-
| '/api/rsc';
88-
fileRoutesById: FileRoutesById;
99+
| '/api/rsc'
100+
fileRoutesById: FileRoutesById
89101
}
90102
export interface RootRouteChildren {
91-
IndexRoute: typeof IndexRoute;
92-
ECommerceRoute: typeof ECommerceRoute;
93-
LowLevelApiRoute: typeof LowLevelApiRoute;
94-
PokemonRoute: typeof PokemonRoute;
95-
PokemonRscRoute: typeof PokemonRscRoute;
96-
ApiRscRoute: typeof ApiRscRoute;
103+
IndexRoute: typeof IndexRoute
104+
ECommerceRoute: typeof ECommerceRoute
105+
LowLevelApiRoute: typeof LowLevelApiRoute
106+
PokemonRoute: typeof PokemonRoute
107+
PokemonRscRoute: typeof PokemonRscRoute
108+
ApiRscRoute: typeof ApiRscRoute
97109
}
98110

99111
declare module '@tanstack/react-router' {
100112
interface FileRoutesByPath {
101113
'/pokemon-rsc': {
102-
id: '/pokemon-rsc';
103-
path: '/pokemon-rsc';
104-
fullPath: '/pokemon-rsc';
105-
preLoaderRoute: typeof PokemonRscRouteImport;
106-
parentRoute: typeof rootRouteImport;
107-
};
114+
id: '/pokemon-rsc'
115+
path: '/pokemon-rsc'
116+
fullPath: '/pokemon-rsc'
117+
preLoaderRoute: typeof PokemonRscRouteImport
118+
parentRoute: typeof rootRouteImport
119+
}
108120
'/pokemon': {
109-
id: '/pokemon';
110-
path: '/pokemon';
111-
fullPath: '/pokemon';
112-
preLoaderRoute: typeof PokemonRouteImport;
113-
parentRoute: typeof rootRouteImport;
114-
};
121+
id: '/pokemon'
122+
path: '/pokemon'
123+
fullPath: '/pokemon'
124+
preLoaderRoute: typeof PokemonRouteImport
125+
parentRoute: typeof rootRouteImport
126+
}
115127
'/low-level-api': {
116-
id: '/low-level-api';
117-
path: '/low-level-api';
118-
fullPath: '/low-level-api';
119-
preLoaderRoute: typeof LowLevelApiRouteImport;
120-
parentRoute: typeof rootRouteImport;
121-
};
128+
id: '/low-level-api'
129+
path: '/low-level-api'
130+
fullPath: '/low-level-api'
131+
preLoaderRoute: typeof LowLevelApiRouteImport
132+
parentRoute: typeof rootRouteImport
133+
}
122134
'/e-commerce': {
123-
id: '/e-commerce';
124-
path: '/e-commerce';
125-
fullPath: '/e-commerce';
126-
preLoaderRoute: typeof ECommerceRouteImport;
127-
parentRoute: typeof rootRouteImport;
128-
};
135+
id: '/e-commerce'
136+
path: '/e-commerce'
137+
fullPath: '/e-commerce'
138+
preLoaderRoute: typeof ECommerceRouteImport
139+
parentRoute: typeof rootRouteImport
140+
}
129141
'/': {
130-
id: '/';
131-
path: '/';
132-
fullPath: '/';
133-
preLoaderRoute: typeof IndexRouteImport;
134-
parentRoute: typeof rootRouteImport;
135-
};
142+
id: '/'
143+
path: '/'
144+
fullPath: '/'
145+
preLoaderRoute: typeof IndexRouteImport
146+
parentRoute: typeof rootRouteImport
147+
}
136148
'/api/rsc': {
137-
id: '/api/rsc';
138-
path: '/api/rsc';
139-
fullPath: '/api/rsc';
140-
preLoaderRoute: typeof ApiRscRouteImport;
141-
parentRoute: typeof rootRouteImport;
142-
};
149+
id: '/api/rsc'
150+
path: '/api/rsc'
151+
fullPath: '/api/rsc'
152+
preLoaderRoute: typeof ApiRscRouteImport
153+
parentRoute: typeof rootRouteImport
154+
}
143155
}
144156
}
145157

@@ -150,16 +162,16 @@ const rootRouteChildren: RootRouteChildren = {
150162
PokemonRoute: PokemonRoute,
151163
PokemonRscRoute: PokemonRscRoute,
152164
ApiRscRoute: ApiRscRoute,
153-
};
165+
}
154166
export const routeTree = rootRouteImport
155167
._addFileChildren(rootRouteChildren)
156-
._addFileTypes<FileRouteTypes>();
168+
._addFileTypes<FileRouteTypes>()
157169

158-
import type { getRouter } from './router';
159-
import type { createStart } from '@tanstack/react-start';
170+
import type { getRouter } from './router.tsx'
171+
import type { createStart } from '@tanstack/react-start'
160172
declare module '@tanstack/react-start' {
161173
interface Register {
162-
ssr: true;
163-
router: Awaited<ReturnType<typeof getRouter>>;
174+
ssr: true
175+
router: Awaited<ReturnType<typeof getRouter>>
164176
}
165177
}

0 commit comments

Comments
 (0)