Skip to content

chore(deps): update dependency vite to v6.1.5 [security] - abandoned #3976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 189 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
b3af7f3
fix: global middleware
tannerlinsley Feb 21, 2025
346174a
fix: rename to global-middleware.ts
tannerlinsley Feb 21, 2025
0e2a7aa
example: fix duration
tannerlinsley Feb 21, 2025
7d0c293
rebased on fix:globalmiddleware
tannerlinsley Feb 21, 2025
4d13067
initial
tannerlinsley Feb 25, 2025
5a3da48
chore: gitignore timestamp files
SeanCassiere Feb 25, 2025
e8c6f18
remove react-start-config
schiller-manuel Feb 25, 2025
b4dd06c
remove vinxi-file-router
schiller-manuel Feb 25, 2025
441b36e
fix package name
schiller-manuel Feb 25, 2025
69d8d96
fix merge, format
schiller-manuel Feb 25, 2025
a3ce53e
fix labeler
schiller-manuel Feb 25, 2025
4dc7d6e
fix docs
schiller-manuel Feb 25, 2025
9db72f2
fix package.json
schiller-manuel Feb 25, 2025
3157b19
update react-start
schiller-manuel Feb 25, 2025
b09e263
bump zod
schiller-manuel Feb 25, 2025
0087d6b
ci: apply automated fixes
autofix-ci[bot] Feb 26, 2025
e33bd0b
Remove "vinxi" from vocab, make dev html response work
tannerlinsley Feb 27, 2025
64c76dd
checkpoint
tannerlinsley Mar 7, 2025
12ee34a
It's working!
tannerlinsley Mar 7, 2025
6fc0df9
chore(root): regen lockfile
SeanCassiere Mar 8, 2025
37812fc
fix(solid-start-plugin): build failures due to type mismatches
SeanCassiere Mar 8, 2025
4713ebf
chore(start-plugin): cleanup this doesn't exist anymore
SeanCassiere Mar 8, 2025
4bfb75b
fix(react-start-plugin): use the `__enableAPIRoutesGeneration` flag
SeanCassiere Mar 8, 2025
0d1fb06
chore(root): sync lockfile and labeler config
SeanCassiere Mar 8, 2025
d4f0a66
checkpoint
tannerlinsley Mar 8, 2025
1c5acbb
rename app to src
tannerlinsley Mar 8, 2025
8cce13b
fix start-basic
tannerlinsley Mar 8, 2025
2aa3740
fix(react-router): revert experimental change about removing the rout…
SeanCassiere Mar 8, 2025
967382d
Merge branch 'main' into devinxi
birkskyum Mar 9, 2025
18f91ad
remove unwanted client/ssr files
birkskyum Mar 9, 2025
2ebac7a
Merge branch 'main' into devinxi
birkskyum Mar 9, 2025
b537200
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
e2dcc8a
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
00c3bee
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
93a7cc2
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
b5f3c4a
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
07e00db
merge main to devinxi
birkskyum Mar 10, 2025
59b92ec
fix imports from ssr-server
birkskyum Mar 10, 2025
3e57ade
format
birkskyum Mar 10, 2025
a224258
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
325ec8c
fix lockfile
birkskyum Mar 10, 2025
6623a87
Merge branch 'main' into devinxi
birkskyum Mar 10, 2025
caad30c
delete handler
birkskyum Mar 10, 2025
01d22a3
catch up some for solid-start
birkskyum Mar 10, 2025
0b9f6b0
keep tsr config routes in src/app/routes
birkskyum Mar 10, 2025
d34c97d
change back imports from "src/" to "~/"
birkskyum Mar 10, 2025
006bba2
change "src/" back to "~/"
birkskyum Mar 10, 2025
8176e75
sync main
birkskyum Mar 10, 2025
916e1a5
fix: devinxi checkpoint
tannerlinsley Mar 10, 2025
233860b
checkpoint
tannerlinsley Mar 11, 2025
3c1064e
checkpoint
tannerlinsley Mar 11, 2025
c1d9288
fix commonjsOptions
schiller-manuel Mar 12, 2025
552e941
checkpoint
tannerlinsley Mar 12, 2025
48059fd
Merge branch 'main' into devinxi
birkskyum Mar 12, 2025
1200f1e
Merge branch 'main' into devinxi
birkskyum Mar 12, 2025
e06b787
add solid-start-plugin and start-basic example
birkskyum Mar 12, 2025
4c13b84
fix workspace - rename to tanstack-solid-start-example-basic
birkskyum Mar 12, 2025
28bb4b6
fix some imports in solid-start example
birkskyum Mar 12, 2025
fb99a30
Merge branch 'main' into devinxi
birkskyum Mar 12, 2025
9d22c53
rework schema
tannerlinsley Mar 12, 2025
cabada8
set Content-Type text/html for error overlay
birkskyum Mar 12, 2025
5fcd5a8
prerendering todo
tannerlinsley Mar 12, 2025
d03fdcd
No nitro exposure
tannerlinsley Mar 12, 2025
630803e
sync solid
birkskyum Mar 12, 2025
f886dc9
add target react, for easier mirror to solid
birkskyum Mar 12, 2025
857bc66
add ssr true flag to solid vite plugin
birkskyum Mar 12, 2025
963d18c
fix deferred
birkskyum Mar 12, 2025
dd55500
fix hydration for solid
birkskyum Mar 12, 2025
8a3d567
checkpoint prerender
tannerlinsley Mar 13, 2025
d646e4f
extract plugin add-ons to the head
SeanCassiere Mar 13, 2025
4ab4aee
move router-manifest to start-server-core
birkskyum Mar 13, 2025
3d715b5
move createStartHandler to start-server-core
birkskyum Mar 13, 2025
d52e33b
merge in main
birkskyum Mar 13, 2025
d6ed319
make start-plugin rely only on router-core
birkskyum Mar 13, 2025
9e19337
lockfile
birkskyum Mar 13, 2025
2fb3180
move compilers to start-plugin-core
birkskyum Mar 13, 2025
35aa77b
prerender solid-start
birkskyum Mar 13, 2025
d0b5c90
More prerendering goodies
tannerlinsley Mar 13, 2025
48ee6a9
prerender onSuccess callback
tannerlinsley Mar 13, 2025
1873a28
sync solid
birkskyum Mar 13, 2025
3a314b8
sync solid
birkskyum Mar 13, 2025
ac75a7f
format
birkskyum Mar 13, 2025
cafaaf0
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Mar 16, 2025
a84033f
checkpoint
tannerlinsley Mar 17, 2025
49ad1b5
checkpoint
tannerlinsley Mar 18, 2025
57422b3
Squashed commit of the following:
tannerlinsley Mar 18, 2025
a640c9a
remove eslint rule
birkskyum Mar 18, 2025
5163473
import createFileRouteImpl
birkskyum Mar 18, 2025
61d0c1d
cleanup imports in solid-start-client
birkskyum Mar 18, 2025
2d80fb9
createFileRoute-without-path in solid-router
birkskyum Mar 18, 2025
ab070e4
chore: improve createFileRoute without path
chorobin Mar 18, 2025
1cae52b
perf: improve ts performance of createFileRoute without path
chorobin Mar 19, 2025
449c331
fix(router-generator): make the type import for pathless `createFileR…
SeanCassiere Mar 19, 2025
68bee62
remove the TYPES_DISABLED guard for the createFileRoute stuff
SeanCassiere Mar 19, 2025
b124fdf
refactor: tidy types in generator
chorobin Mar 19, 2025
0307ed7
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 19, 2025
bfee8e9
chore: try types
chorobin Mar 19, 2025
07068c7
chore: add short hand function handler example
chorobin Mar 19, 2025
27f5a54
checkpoint
tannerlinsley Mar 20, 2025
32ec982
checkpoint
tannerlinsley Mar 20, 2025
d9c6e95
chore: checkpoint
chorobin Mar 20, 2025
86cc390
checkpoint
tannerlinsley Mar 20, 2025
1fe1992
sync solid ab070e4
birkskyum Mar 21, 2025
6cc793c
sync solid 1cae52b
birkskyum Mar 21, 2025
ef262bf
sync solid/start-basic example
birkskyum Mar 21, 2025
986af07
update solid/start-bare
birkskyum Mar 21, 2025
de4dae1
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Mar 21, 2025
66b5151
chore: checkpoint
chorobin Mar 21, 2025
9126786
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 21, 2025
3f6bddd
checkpoint
tannerlinsley Mar 21, 2025
b2c3330
checkpoint
tannerlinsley Mar 22, 2025
473f19d
chorepoint
chorobin Mar 22, 2025
bb4b5dd
generate typemaps for server routes
tannerlinsley Mar 23, 2025
1970526
checkpoint
chorobin Mar 23, 2025
8748329
chore: update example
chorobin Mar 23, 2025
3a43ebd
checkpoint
chorobin Mar 23, 2025
6518a15
fix: param merging
chorobin Mar 23, 2025
3bc8d55
refactor: tidy up types to read top to bottom
chorobin Mar 24, 2025
15d6d1e
checkpoint
tannerlinsley Mar 24, 2025
17eb443
commit
tannerlinsley Mar 24, 2025
d9efaf3
checkpoint
chorobin Mar 24, 2025
c493e01
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 24, 2025
698041f
fix: type errors
chorobin Mar 24, 2025
cabdb6c
Resolve client validator input type
tannerlinsley Mar 24, 2025
03f5b36
fixup
tannerlinsley Mar 25, 2025
f3e6838
sync solid
birkskyum Mar 25, 2025
e8a9ba2
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Mar 25, 2025
803821e
cleanup solid-start-client
birkskyum Mar 25, 2025
a195e98
fix(router-generator): only `declare module` when using typescript
SeanCassiere Mar 25, 2025
22a0b2f
sync solid
birkskyum Mar 26, 2025
f99426d
move framework specific compilers code to react/solid-start-plugin
birkskyum Mar 26, 2025
acf5b46
chore: revert validator type logic
chorobin Mar 26, 2025
7c725ae
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 26, 2025
bb3b341
feat: allow [.] escapes in file-based routing filenames
tannerlinsley Mar 27, 2025
6efcf14
Remove log noise
tannerlinsley Mar 27, 2025
51b2d0a
feat: allow discriminated unions for inputs
chorobin Mar 27, 2025
09b8853
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 27, 2025
64a83be
chore: use validator constraint
chorobin Mar 27, 2025
d609f57
checkpoint
tannerlinsley Mar 27, 2025
89d1ce6
check
tannerlinsley Mar 27, 2025
0a0f242
check
tannerlinsley Mar 27, 2025
00ff74a
use factory to move start-plugin code to shared package
birkskyum Mar 28, 2025
22af722
move queue
birkskyum Mar 28, 2025
f29ca3e
move build-nitro to start-plugin-core
birkskyum Mar 28, 2025
0264ba7
move build-sitemap to start-plugin-core
birkskyum Mar 28, 2025
4bedd81
fix import orders
birkskyum Mar 28, 2025
f540854
move schema to start-plugin-core
birkskyum Mar 28, 2025
2890c3a
remove unused export start-plugin-core
birkskyum Mar 28, 2025
0718cd8
fix solid/react in vite plugin options
birkskyum Mar 29, 2025
2acd2d2
move dependency for `@tanstack/router-generator` to `start-plugin-core`
SeanCassiere Mar 29, 2025
a834090
chore(solid-start-plugin): remove react-refresh checks
SeanCassiere Mar 29, 2025
24c24c5
refactor(start-plugin-core): more strictly type the `factory` input f…
SeanCassiere Mar 29, 2025
e79d798
feat: improve validator types
chorobin Mar 29, 2025
28b7847
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 29, 2025
16bf028
chore: fix users example
chorobin Mar 29, 2025
daecd77
sync validation in solid/start-basic example
birkskyum Mar 30, 2025
27e34cb
feat: allow merging of validators from parents to children
chorobin Mar 30, 2025
8fadf98
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 30, 2025
eeb6bf3
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Mar 31, 2025
74ad911
chore(start-plugin-core,react-start-plugin,solid-start-plugin): bump …
SeanCassiere Mar 31, 2025
87b71d5
perf: add ServerRoute to large example and variance annotations
chorobin Mar 31, 2025
3c0ae1e
Merge remote-tracking branch 'origin/devinxi' into devinxi
chorobin Mar 31, 2025
acd5e55
perf: improve type perf for server route
chorobin Mar 31, 2025
6a4157b
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Mar 31, 2025
eb82c7a
test(router-plugin): use `id` instead of `root`
SeanCassiere Mar 31, 2025
e13813a
feat: add types for getServerFileRouteApi
chorobin Apr 2, 2025
48b6d99
chore: add export for getServerFileRouteApi
chorobin Apr 2, 2025
64ffae4
chore: add additional exports
chorobin Apr 2, 2025
b36447f
fix: add serverFileRoutesById to generator
chorobin Apr 2, 2025
25d438b
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 2, 2025
d16875a
fix(react,solid): extract CSS for preloading
SeanCassiere Apr 3, 2025
e42f3b3
feat(start-plugin-core): remove `.vite` directory from build
SeanCassiere Apr 3, 2025
2dd751d
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 3, 2025
41126d6
refactor: reuse `rootRouteId`
SeanCassiere Apr 3, 2025
f0cd2f4
fix(router-plugin): support code-splitting using the new `createFileR…
SeanCassiere Apr 3, 2025
48ca274
fix(react,start): add CSS urls to `route.assets`
SeanCassiere Apr 3, 2025
7e2e5c9
refactor(start-server-core): remove unnecessary typing
SeanCassiere Apr 3, 2025
79765a3
refactor: server route types and add get to large example
chorobin Apr 3, 2025
f2ce189
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 4, 2025
dd51b04
test(router-generator): update snapshots for the numbers in filename …
SeanCassiere Apr 4, 2025
fced7f7
checkpoint
tannerlinsley Apr 4, 2025
0c41d0e
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 6, 2025
62166cc
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 6, 2025
c1fdc50
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 10, 2025
5b9a148
chore: remove vinxi from the start-workos example
SeanCassiere Apr 10, 2025
8211b64
Merge remote-tracking branch 'origin/main' into devinxi
SeanCassiere Apr 10, 2025
0fc3693
release: v1.116.0
schiller-manuel Apr 10, 2025
93187d6
release: v1.116.0
schiller-manuel Apr 10, 2025
785b64d
chore(deps): update dependency vite to v6.1.5 [security]
renovate[bot] Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@
- 'packages/start-api-routes/**/*'
'package: react-start-client':
- 'packages/react-start-client/**/*'
'package: react-start-config':
- 'packages/react-start-config/**/*'
'package: react-start-plugin':
- 'packages/react-start-plugin/**/*'
'package: react-start-router-manifest':
- 'packages/react-start-router-manifest/**/*'
'package: react-start-server':
- 'packages/react-start-server/**/*'
'package: start-server-functions-client':
- 'packages/start-server-functions-client/**/*'
'package: start-server-functions-fetcher':
- 'packages/start-server-functions-fetcher/**/*'
'package: start-server-functions-handler':
- 'packages/start-server-functions-handler/**/*'
'package: start-server-functions-ssr':
- 'packages/start-server-functions-ssr/**/*'
'package: router-cli':
Expand Down Expand Up @@ -74,8 +68,6 @@
- 'packages/solid-start-server/**/*'
'package: start':
- 'packages/start/**/*'
'package: start-config':
- 'packages/start-config/**/*'
'package: start-server-functions-server':
- 'packages/start-server-functions-server/**/*'
'package: valibot-adapter':
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ nx-cloud.env
gpt/db.json

app.config.timestamp-*
vite.config.timestamp-*
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
app.config.js.timestamp-*
app.config.ts.timestamp-*

app.config.timestamp_*
vite.config.timestamp_*
vite.config.js.timestamp_*
vite.config.ts.timestamp_*
app.config.js.timestamp_*
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
provenance=false
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
pnpm-lock.yaml
**/snapshots
**/.vercel
**/.vinxi
**/.output
**/node_modules
node_modules
Expand Down
4 changes: 2 additions & 2 deletions docs/router/eslint/create-route-property-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Examples of **incorrect** code for this rule:
/* eslint "@tanstack/router/create-route-property-order": "warn" */
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/foo/bar/$id')({
export const Route = createFileRoute({
loader: async ({context}) => {
await context.queryClient.ensureQueryData(getQueryOptions(context.hello)),
},
Expand All @@ -43,7 +43,7 @@ Examples of **correct** code for this rule:
/* eslint "@tanstack/router/create-route-property-order": "warn" */
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/foo/bar/$id')({
export const Route = createFileRoute({
beforeLoad: () => ({hello: 'world'}),
loader: async ({context}) => {
await context.queryClient.ensureQueryData(getQueryOptions(context.hello)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A new function that accepts a single argument of type [`RouteOptions`](./RouteOp
```tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/')({
export const Route = createFileRoute({
loader: () => {
return 'Hello World'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const searchSchema = z.object({
two: z.string().optional(),
})

export const Route = createFileRoute('/hello')({
export const Route = createFileRoute({
validateSearch: zodValidator(searchSchema),
search: {
middlewares: [retainSearchParams(true)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const searchSchema = z.object({
two: z.string().default(defaultValues.two),
})

export const Route = createFileRoute('/hello')({
export const Route = createFileRoute({
validateSearch: zodValidator(searchSchema),
search: {
// strip default values
Expand Down Expand Up @@ -68,7 +68,7 @@ const searchSchema = z.object({
two: z.string().default('xyz'),
})

export const Route = createFileRoute('/hello')({
export const Route = createFileRoute({
validateSearch: zodValidator(searchSchema),
search: {
// remove all search params
Expand Down
2 changes: 1 addition & 1 deletion docs/router/framework/react/decisions-on-dx.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Let's take a look at how the route configuration for the previous example would
// src/routes/posts/index.ts
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/posts/')({
export const Route = createFileRoute({
component: () => 'Posts index component goes here!!!',
})
```
Expand Down
6 changes: 3 additions & 3 deletions docs/router/framework/react/guide/external-data-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Here is a naive illustration (don't do this) of using a Route's `loader` option
// src/routes/posts.tsx
let postsCache = []

export const Route = createFileRoute('/posts')({
export const Route = createFileRoute({
loader: async () => {
postsCache = await fetchPosts()
},
Expand Down Expand Up @@ -80,7 +80,7 @@ const postsQueryOptions = queryOptions({
queryFn: () => fetchPosts(),
})

export const Route = createFileRoute('/posts')({
export const Route = createFileRoute({
// Use the `loader` option to ensure that the data is loaded
loader: () => queryClient.ensureQueryData(postsQueryOptions),
component: () => {
Expand All @@ -105,7 +105,7 @@ export const Route = createFileRoute('/posts')({
When an error occurs while using `suspense` with `Tanstack Query`, you'll need to let queries know that you want to try again when re-rendering. This can be done by using the `reset` function provided by the `useQueryErrorResetBoundary` hook. We can invoke this function in an effect as soon as the error component mounts. This will make sure that the query is reset and will try to fetch data again when the route component is rendered again. This will also cover cases where users navigate away from our route instead of clicking the `retry` button.

```tsx
export const Route = createFileRoute('/posts')({
export const Route = createFileRoute({
loader: () => queryClient.ensureQueryData(postsQueryOptions),
errorComponent: ({ error, reset }) => {
const router = useRouter()
Expand Down
10 changes: 5 additions & 5 deletions docs/router/framework/react/guide/router-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Once you have defined the router context type, you can use it in your route defi

```tsx
// src/routes/todos.tsx
export const Route = createFileRoute('/todos')({
export const Route = createFileRoute({
component: Todos,
loader: ({ context }) => fetchTodosByUserId(context.user.id),
})
Expand Down Expand Up @@ -122,7 +122,7 @@ Then, in your route:

```tsx
// src/routes/todos.tsx
export const Route = createFileRoute('/todos')({
export const Route = createFileRoute({
component: Todos,
loader: ({ context }) => context.fetchTodosByUserId(context.userId),
})
Expand Down Expand Up @@ -158,7 +158,7 @@ Then, in your route:

```tsx
// src/routes/todos.tsx
export const Route = createFileRoute('/todos')({
export const Route = createFileRoute({
component: Todos,
loader: async ({ context }) => {
await context.queryClient.ensureQueryData({
Expand Down Expand Up @@ -234,7 +234,7 @@ So, now in our route's `loader` function, we can access the `networkStrength` ho
```tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/posts')({
export const Route = createFileRoute({
component: Posts,
loader: ({ context }) => {
if (context.networkStrength === 'STRONG') {
Expand Down Expand Up @@ -282,7 +282,7 @@ const router = createRouter({
```tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/todos')({
export const Route = createFileRoute({
component: Todos,
beforeLoad: () => {
return {
Expand Down
70 changes: 10 additions & 60 deletions docs/router/framework/react/guide/tanstack-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,12 @@ TanStack Start is powered by the following packages and need to be installed as

- [@tanstack/start](https://github.com/tanstack/start)
- [@tanstack/react-router](https://tanstack.com/router)
- [Vinxi](https://vinxi.vercel.app/)

> [!NOTE]
> Vinxi is a temporary dependency that will be replaced by a simple vite plugin or a dedicated Start CLI.
- [Vite](https://vite.dev/)

To install them, run:

```shell
npm i @tanstack/react-start @tanstack/react-router vinxi
npm i @tanstack/react-start @tanstack/react-router vite
```

You'll also need React and the Vite React plugin, so install their dependencies as well:
Expand All @@ -72,16 +69,16 @@ npm i -D typescript @types/react @types/react-dom

# Update Configuration Files

We'll then update our `package.json` to use Vinxi's CLI and set `"type": "module"`:
We'll then update our `package.json` to use Vite's CLI and set `"type": "module"`:

```jsonc
{
// ...
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"dev": "vite dev",
"build": "vite build",
"start": "vite start",
},
}
```
Expand All @@ -97,12 +94,10 @@ export default defineConfig({})

# Add the Basic Templating

There are four required files for TanStack Start usage:
There are 2 required files for TanStack Start usage:

1. The router configuration
2. The server entry point
3. The client entry point
4. The root of your application
2. The root of your application

Once configuration is done, we'll have a file tree that looks like the following:

Expand All @@ -111,10 +106,8 @@ Once configuration is done, we'll have a file tree that looks like the following
├── app/
│ ├── routes/
│ │ └── `__root.tsx`
│ ├── `client.tsx`
│ ├── `router.tsx`
│ ├── `routeTree.gen.ts`
│ └── `ssr.tsx`
├── `.gitignore`
├── `app.config.ts`
├── `package.json`
Expand All @@ -123,7 +116,7 @@ Once configuration is done, we'll have a file tree that looks like the following

## The Router Configuration

This is the file that will dictate the behavior of TanStack Router used within Start. Here, you can configure everything
This is the file that will dictate the behavior of TanStack Router used within Start for both the server and the client. Here, you can configure everything
from the default [preloading functionality](./preloading.md) to [caching staleness](./data-loading.md).

```tsx
Expand All @@ -149,52 +142,9 @@ declare module '@tanstack/react-router' {
> `routeTree.gen.ts` is not a file you're expected to have at this point.
> It will be generated when you run TanStack Start (via `npm run dev` or `npm run start`) for the first time.

## The Server Entry Point

As TanStack Start is an [SSR](https://unicorn-utterances.com/posts/what-is-ssr-and-ssg) framework, we need to pipe this router
information to our server entry point:

```tsx
// app/ssr.tsx
import {
createStartHandler,
defaultStreamHandler,
} from '@tanstack/react-start/server'
import { getRouterManifest } from '@tanstack/react-start/router-manifest'

import { createRouter } from './router'

export default createStartHandler({
createRouter,
getRouterManifest,
})(defaultStreamHandler)
```

This allows us to know what routes and loaders we need to execute when the user hits a given route.

## The Client Entry Point

Now we need a way to hydrate our client-side JavaScript once the route resolves to the client. We do this by piping the same
router information to our client entry point:

```tsx
// app/client.tsx
import { hydrateRoot } from 'react-dom/client'
import { StartClient } from '@tanstack/react-start'
import { createRouter } from './router'

const router = createRouter({
scrollRestoration: true,
})

hydrateRoot(document!, <StartClient router={router} />)
```

This enables us to kick off client-side routing once the user's initial server request has fulfilled.

## The Root of Your Application

Finally, we need to create the root of our application. This is the entry point for all other routes. The code in this file will wrap all other routes in the application.
Finally, we need to create the root of our application. This is the entry point for all application routes. The code in this file will wrap all other routes in the application.

```tsx
// app/routes/__root.tsx
Expand Down
8 changes: 4 additions & 4 deletions docs/router/framework/react/migrate-from-react-location.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const Route = createRootRoute({
// src/routes/index.tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/')({
export const Route = createFileRoute({
component: Index,
})
```
Expand All @@ -125,7 +125,7 @@ export const Route = createFileRoute('/')({
// src/routes/posts.tsx
import { createFileRoute, Link, Outlet } from '@tanstack/react-router'

export const Route = createFileRoute('/posts')({
export const Route = createFileRoute({
component: Posts,
loader: async () => {
const posts = await fetchPosts()
Expand Down Expand Up @@ -164,7 +164,7 @@ function Posts() {
// src/routes/posts.index.tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/posts/')({
export const Route = createFileRoute({
component: PostsIndex,
})
```
Expand All @@ -177,7 +177,7 @@ export const Route = createFileRoute('/posts/')({
// src/routes/posts.$postId.tsx
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/posts/$postId')({
export const Route = createFileRoute({
component: PostsId,
loader: async ({ params: { postId } }) => {
const post = await fetchPost(postId)
Expand Down
2 changes: 1 addition & 1 deletion docs/router/framework/react/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ It's probably no surprise at this point that picking a router is so important th

**Does this mean that TanStack Router is a framework?**

TanStack Router itself is not a "framework" in the traditional sense, since it doesn't address a few other common full-stack concerns. However TanStack Router has been designed to be upgradable to a full-stack framework when used in conjunction with other tools that address bundling, deployments, and server-side-specific functionality. This is why we are currently developing [TanStack Start](https://tanstack.com/start), a full-stack framework that is built on top of TanStack Router and tools like Nitro, and Vite.
TanStack Router itself is not a "framework" in the traditional sense, since it doesn't address a few other common full-stack concerns. However TanStack Router has been designed to be upgradable to a full-stack framework when used in conjunction with other tools that address bundling, deployments, and server-side-specific functionality. This is why we are currently developing [TanStack Start](https://tanstack.com/start), a full-stack framework that is built on top of TanStack Router and Vite.

For a deeper dive on the history of TanStack Router, feel free to read [TanStack Router's History](./decisions-on-dx.md#tanstack-routers-origin-story).

Expand Down
Loading
Loading