Repository: TanStack/router
Pull request #2237 (2024-08-31 18:14:03)

fix(react-router): do not use routeId as key when rendering route component to avoid re-mounting

nx-cloud[bot]: # ☁️ Nx Cloud Report

CI is running for commit c583f9744c44ddd1527842f7456d42994467e3a1.

[📂 Click to track the progress, see the status, the terminal output, and the build insights.](https://cloud.nx.app/cipes/66d35d84ba0c54241ee19719?utm_source=pull-request&utm_medium=comment)


---

Sent with 💌 from [NxCloud.](https://nx.app?utm_source=pull-request&utm_medium=comment)
pkg-pr-new[bot]: 
[Open in Stackblitz](https://pkg.pr.new/template/72156cd5-1db9-4bfd-9179-79df09572117)
<details><summary><b>More templates</b></summary><p>

- [tanstack-router-react-example-authenticated-routes](https://pkg.pr.new/template/b2c410b5-9840-4fbc-91b3-7c125b9e8789)
- [tanstack-router-react-example-basic](https://pkg.pr.new/template/35fa231a-d900-41be-86b2-95d12304fd6e)
- [tanstack-router-react-example-basic-default-search-params](https://pkg.pr.new/template/6eba685b-5c92-4962-ac64-dd75b17c2467)
- [tanstack-router-react-example-basic-file-based](https://pkg.pr.new/template/176870c9-72d1-49ff-83cc-6ecaebd51060)
- [tanstack-router-react-example-basic-file-based-codesplitting](https://pkg.pr.new/template/a9019c91-7187-4d86-a7f9-4eb1374c45ae)
- [tanstack-router-react-example-react-query](https://pkg.pr.new/template/0182a445-5e94-4177-b178-0348ede258fd)
- [tanstack-router-react-example-basic-react-query-file-based](https://pkg.pr.new/template/a21590f8-f463-4e5f-a176-c522bb30ebf0)
- [tanstack-router-react-example-basic-ssr-file-based](https://pkg.pr.new/template/b55f3cb1-195c-4509-b595-84ae6ce32df1)
- [tanstack-router-react-example-basic-ssr-streaming-file-based](https://pkg.pr.new/template/9da2fba5-4fd1-463e-825c-91f58bffc561)
- [tanstack-router-react-example-deferred-data](https://pkg.pr.new/template/737a9690-5326-4193-8748-761c8afa1e4f)
- [tanstack-router-react-example-kitchen-sink](https://pkg.pr.new/template/52532c92-f128-4b27-b672-b081aa44043f)
- [tanstack-router-react-example-kitchen-sink-file-based](https://pkg.pr.new/template/c7b1181f-0dbc-40da-863c-e47e12d36528)
- [tanstack-router-react-example-kitchen-sink-react-query](https://pkg.pr.new/template/6b637b6c-a621-42d9-bf7a-044c6320dbda)
- [tanstack-router-react-example-kitchen-sink-react-query-file-based](https://pkg.pr.new/template/d59e3cb7-5c92-4ecb-aabd-2e63225c8e98)
- [tanstack-router-react-example-large-file-based](https://pkg.pr.new/template/90a92855-d83b-4151-b943-1428f1ffc12c)
- [tanstack-router-react-example-location-masking](https://pkg.pr.new/template/6b6c6547-3995-4e90-9b60-cadf94df0afd)
- [tanstack-router-react-example-navigation-blocking](https://pkg.pr.new/template/b74246d9-f013-47df-b6ac-99638700abb3)
- [tanstack-router-react-example-quickstart](https://pkg.pr.new/template/5705dd0d-e3c3-451a-9ca2-bb325648dcc8)
- [tanstack-router-react-example-quickstart-file-based](https://pkg.pr.new/template/562ee89f-8bd6-4532-bba8-7d325a804758)
- [tanstack-router-react-example-quickstart-rspack-file-based](https://pkg.pr.new/template/3c96d3c7-b79d-42cf-8f18-24d20ece78e9)
- [tanstack-router-react-example-quickstart-webpack-file-based](https://pkg.pr.new/template/75f07ea8-2968-4e24-9135-5fd5ff86f413)
- [tanstack-router-react-example-scroll-restoration](https://pkg.pr.new/template/504f07a1-6819-49db-8e27-b01b2b882a78)
- [tanstack-router-search-validator-adapters](https://pkg.pr.new/template/5f38087e-b6ef-43e5-8263-708a8b95bc28)
- [tanstack-router-example-react-start-basic](https://pkg.pr.new/template/ee4d3e9a-8138-400e-8801-53ceaed47501)
- [tanstack-router-example-react-start-basic-auth](https://pkg.pr.new/template/1a58ac01-013e-41b8-b2ee-ae3e15880716)
- [tanstack-router-example-react-start-basic-counter](https://pkg.pr.new/template/95c98024-ea76-48e0-991c-3b368770ff14)
- [tanstack-router-example-react-start-basic-react-query](https://pkg.pr.new/template/80b29219-3199-4752-add2-4972db2864c3)
- [tanstack-router-example-react-start-basic-rsc](https://pkg.pr.new/template/2f37ed73-ce89-42b3-bc74-79c4ad1467f6)
- [tanstack-router-example-react-start-clerk-basic](https://pkg.pr.new/template/8a3d8943-482e-417b-a5c7-3eab97a5a359)
- [tanstack-router-example-react-start-trello-trellaux](https://pkg.pr.new/template/5b391989-295b-4d3b-b9ce-1c6bc7c2b19c)
- [tanstack-router-example-react-start-trellaux](https://pkg.pr.new/template/8f9b729c-ea67-408a-ac5a-4d8748079e76)
- [tanstack-router-react-example-with-framer-motion](https://pkg.pr.new/template/9cf5c36a-21bb-41a8-bbf9-da0db3cd65e0)
- [tanstack-router-react-example-with-trpc](https://pkg.pr.new/template/303a1a33-841f-4841-abf2-4e11dcbc7185)
- [tanstack-router-react-example-with-trpc-react-query](https://pkg.pr.new/template/eaa2336b-fc37-4d34-af05-12755a63b329)

</p></details>
      
    


<details><summary><b>@tanstack/history</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/history@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/react-cross-context</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/react-router</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-router@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/react-router-with-query</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-arktype-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-arktype-adapter@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-cli</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-cli@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-devtools</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-devtools@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-generator</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-generator@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-plugin@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-valibot-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-vite-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/router-zod-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-zod-adapter@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/start</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/start@2237
```

</p></details>
      
    

<details><summary><b>@tanstack/start-vite-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2237
```

</p></details>
      
    

_commit: <a href="https://github.com/TanStack/router/runs/29515144570"><code>c583f97</code></a>_


Patch:
diff --git a/docs/framework/react/guide/file-based-routing.md b/docs/framework/react/guide/file-based-routing.md
index a54037493..ac93d9ec5 100644
--- a/docs/framework/react/guide/file-based-routing.md
+++ b/docs/framework/react/guide/file-based-routing.md
@@ -132,9 +132,11 @@ File-based routing requires that you follow a few simple file naming conventions
 - **`(folder)` folder name pattern**:
   - A folder that matches this pattern is treated as a **route group** which prevents this folder to be included in the route's URL path.
 - **`index` Token**
-  - Routes segments ending with the `index` token (but before any file types) will be used to match the parent route when the URL pathname matches the parent route exactly.
+  - Routes segments ending with the `index` token (but before any file types) will be used to match the parent route when the URL pathname matches the parent route exactly.  
+    This can be configured via the `indexToken` configuration option, see [options](#options).
 - **`.route.tsx` File Type**
-  - When using directories to organize your routes, the `route` suffix can be used to create a route file at the directory's path. For example, `blog.post.route.tsx` or `blog/post/route.tsx` can be used at the route file for the `/blog/post` route.
+  - When using directories to organize your routes, the `route` suffix can be used to create a route file at the directory's path. For example, `blog.post.route.tsx` or `blog/post/route.tsx` can be used at the route file for the `/blog/post` route.  
+    This can be configured via the `routeToken` configuration option, see [options](#options).
 - **`.lazy.tsx` File Type**
   - The `lazy` suffix can be used to code-split components for a route. For example, `blog.post.lazy.tsx` will be used as the component for the `blog.post` route.
 
@@ -331,6 +333,10 @@ The following options are available for configuration via the `tsr.config.json`
   - (Optional, **Defaults to `-`**) Route files and directories that start with this string will be ignored. By default this is set to `-` to allow for the use of directories to house related files that do not contain any route files.
 - **`routeFileIgnorePattern`**
   - (Optional) Ignore specific files and directories in the route directory. It can be used in regular expression format. For example, `.((css|const).ts)|test-page` will ignore files / directories with names containing `.css.ts`, `.const.ts` or `test-page`.
+- **`indexToken`**
+  - (Optional, **Defaults to `'index'`**) allows to customize the `index` Token [file naming convention](#file-naming-conventions).
+- **`routeToken`**
+  - (Optional, **Defaults to `'route'`**) allows to customize the `route` Token [file naming convention](#file-naming-conventions).
 - **`routesDirectory`**
   - (Required) The directory containing the routes relative to the cwd.
 - **`generatedRouteTree`**
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 12dffe9f0..0a543817c 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -11,7 +11,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-file-based-codesplitting/package.json b/examples/react/basic-file-based-codesplitting/package.json
index 0892c49d4..311f91f82 100644
--- a/examples/react/basic-file-based-codesplitting/package.json
+++ b/examples/react/basic-file-based-codesplitting/package.json
@@ -11,7 +11,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index c8d0abe66..996373fd1 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -12,7 +12,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index f9cbf5f7c..0bf47a0b3 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -14,7 +14,7 @@
     "@tanstack/react-query-devtools": "^5.51.21",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 0ecae8038..f7cbd9c24 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 54b5c49c2..b4b27d236 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 0bfa5d8ca..d3ba51167 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -11,7 +11,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 63044af86..4cf875ffe 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -13,7 +13,7 @@
     "@tanstack/react-query-devtools": "^5.51.21",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index bdfa98cb6..e48dbb664 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -14,7 +14,7 @@
     "@tanstack/react-query": "^5.51.21",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index a58df31ab..be737782f 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -11,7 +11,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "immer": "^10.1.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index c4e374c20..dbc1acb6a 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -16,7 +16,7 @@
   "devDependencies": {
     "@rsbuild/core": "1.0.1-rc.0",
     "@rsbuild/plugin-react": "1.0.1-rc.0",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "@types/react": "^18.3.3",
     "@types/react-dom": "^18.3.0",
     "typescript": "^5.5.3"
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 5662fa9f1..ffbf193dc 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -14,7 +14,7 @@
   },
   "devDependencies": {
     "@swc/core": "^1.7.6",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "@types/react": "^18.3.3",
     "@types/react-dom": "^18.3.0",
     "html-webpack-plugin": "^5.6.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 7bff705bc..58884be1b 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -11,7 +11,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "@tanstack/router-zod-adapter": "^1.51.9",
     "@tanstack/router-valibot-adapter": "^1.51.9",
     "@tanstack/router-arktype-adapter": "^1.51.9",
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 8ee073a80..396011319 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -16,8 +16,8 @@
     "@prisma/client": "5.17.0",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.12",
diff --git a/examples/react/start-basic-counter/package.json b/examples/react/start-basic-counter/package.json
index 1bc309e45..1cc270cb1 100644
--- a/examples/react/start-basic-counter/package.json
+++ b/examples/react/start-basic-counter/package.json
@@ -12,7 +12,7 @@
   },
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/start": "^1.52.0",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
     "vinxi": "0.4.2"
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 106622cb5..bf24a23e7 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -17,8 +17,8 @@
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/react-router-with-query": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "react": "^18.3.1",
diff --git a/examples/react/start-basic-rsc/package.json b/examples/react/start-basic-rsc/package.json
index 8918415ee..6cfe77ea9 100644
--- a/examples/react/start-basic-rsc/package.json
+++ b/examples/react/start-basic-rsc/package.json
@@ -14,8 +14,8 @@
     "@babel/plugin-syntax-typescript": "^7.24.7",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "redaxios": "^0.5.1",
     "tailwind-merge": "^2.5.2",
     "vinxi": "0.4.2"
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 9ad3064a9..fdcbd0dc9 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -14,8 +14,8 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "react": "^18.3.1",
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index 0116987a3..d47741c14 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -15,8 +15,8 @@
     "@clerk/tanstack-start": "0.3.0-snapshot.vdf04997",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.12",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index ce4345c7c..932689838 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -18,8 +18,8 @@
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/react-router-with-query": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "@convex-dev/react-query": "0.0.0-alpha.5",
     "concurrently": "^8.2.2",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 91ba52c87..af73d11d8 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -16,8 +16,8 @@
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/react-router-with-query": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
-    "@tanstack/start": "^1.51.9",
+    "@tanstack/router-plugin": "^1.52.0",
+    "@tanstack/start": "^1.52.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "ky": "^1.5.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index 7e0516609..98b033c75 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -12,7 +12,7 @@
     "@tanstack/react-query-devtools": "^5.51.21",
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "@trpc/client": "11.0.0-rc.477",
     "@trpc/react-query": "11.0.0-rc.477",
     "@trpc/server": "11.0.0-rc.477",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 37f936574..b55e85db0 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -10,7 +10,7 @@
   "dependencies": {
     "@tanstack/react-router": "^1.51.9",
     "@tanstack/router-devtools": "^1.51.9",
-    "@tanstack/router-plugin": "^1.51.6",
+    "@tanstack/router-plugin": "^1.52.0",
     "@trpc/client": "11.0.0-rc.477",
     "@trpc/server": "11.0.0-rc.477",
     "react": "^18.2.0",
diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx
index 24cfe0681..57c8754c5 100644
--- a/packages/react-router/src/Match.tsx
+++ b/packages/react-router/src/Match.tsx
@@ -129,8 +129,8 @@ export const MatchInner = React.memo(function MatchInnerImpl({
 
   const out = React.useMemo(() => {
     const Comp = route.options.component ?? router.options.defaultComponent
-    return Comp ? <Comp key={routeId} /> : <Outlet />
-  }, [routeId, route.options.component, router.options.defaultComponent])
+    return Comp ? <Comp /> : <Outlet />
+  }, [route.options.component, router.options.defaultComponent])
 
   // function useChangedDiff(value: any) {
   //   const ref = React.useRef(value)
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index 56ce88d22..b7a47fb7b 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-cli",
-  "version": "1.51.6",
+  "version": "1.52.0",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index e6b16ee40..bb07408d5 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-generator",
-  "version": "1.51.6",
+  "version": "1.52.0",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-generator/src/config.ts b/packages/router-generator/src/config.ts
index 9c96132b4..0f36cf3cb 100644
--- a/packages/router-generator/src/config.ts
+++ b/packages/router-generator/src/config.ts
@@ -29,6 +29,8 @@ export const configSchema = z.object({
     .optional()
     .default(['/* prettier-ignore-end */']),
   autoCodeSplitting: z.boolean().optional(),
+  indexToken: z.string().optional().default('index'),
+  routeToken: z.string().optional().default('route'),
   experimental: z
     .object({
       // TODO: Remove this option in the next major release (v2).
@@ -94,5 +96,26 @@ export function getConfig(
     }
   }
 
+  validateConfig(config)
+  return config
+}
+
+function validateConfig(config: Config) {
+  if (typeof config.experimental?.enableCodeSplitting !== 'undefined') {
+    const message = `
+------
+⚠️ ⚠️ ⚠️
+ERROR: The "experimental.enableCodeSplitting" flag has been made stable and is now "autoCodeSplitting". Please update your configuration file to use "autoCodeSplitting" instead of "experimental.enableCodeSplitting".
+------
+`
+    console.error(message)
+    throw new Error(message)
+  }
+
+  if (config.indexToken === config.routeToken) {
+    throw new Error(
+      `The "indexToken" and "routeToken" options must be different.`,
+    )
+  }
   return config
 }
diff --git a/packages/router-generator/src/generator.ts b/packages/router-generator/src/generator.ts
index 90622fd0a..02ed11893 100644
--- a/packages/router-generator/src/generator.ts
+++ b/packages/router-generator/src/generator.ts
@@ -100,7 +100,7 @@ async function getRouteNodes(config: Config) {
             routePath = routePath.replace(/\/lazy$/, '')
           }
 
-          const isRoute = routePath.endsWith('/route')
+          const isRoute = routePath.endsWith(`/${config.routeToken}`)
           const isComponent = routePath.endsWith('/component')
           const isErrorComponent = routePath.endsWith('/errorComponent')
           const isPendingComponent = routePath.endsWith('/pendingComponent')
@@ -110,8 +110,12 @@ async function getRouteNodes(config: Config) {
           )
 
           const segments = routePath.split('/')
+          const lastRouteSegment = segments[segments.length - 1]
           const isLayout =
-            segments[segments.length - 1]?.startsWith('_') || false
+            (lastRouteSegment !== config.indexToken &&
+              lastRouteSegment !== config.routeToken &&
+              lastRouteSegment?.startsWith('_')) ||
+            false
 
           ;(
             [
@@ -129,15 +133,18 @@ async function getRouteNodes(config: Config) {
           })
 
           routePath = routePath.replace(
-            /\/(component|errorComponent|pendingComponent|loader|route|lazy)$/,
+            new RegExp(
+              `/(component|errorComponent|pendingComponent|loader|${config.routeToken}|lazy)$`,
+            ),
             '',
           )
 
-          if (routePath === 'index') {
+          if (routePath === config.indexToken) {
             routePath = '/'
           }
 
-          routePath = routePath.replace(/\/index$/, '/') || '/'
+          routePath =
+            routePath.replace(new RegExp(`/${config.indexToken}$`), '/') || '/'
 
           routeNodes.push({
             filePath,
@@ -218,14 +225,16 @@ export async function generator(config: Config) {
   const preRouteNodes = multiSortBy(beforeRouteNodes, [
     (d) => (d.routePath === '/' ? -1 : 1),
     (d) => d.routePath?.split('/').length,
-    (d) => (d.filePath.match(/[./]index[.]/) ? 1 : -1),
+    (d) =>
+      d.filePath.match(new RegExp(`[./]${config.indexToken}[.]`)) ? 1 : -1,
     (d) =>
       d.filePath.match(
         /[./](component|errorComponent|pendingComponent|loader|lazy)[.]/,
       )
         ? 1
         : -1,
-    (d) => (d.filePath.match(/[./]route[.]/) ? -1 : 1),
+    (d) =>
+      d.filePath.match(new RegExp(`[./]${config.routeToken}[.]`)) ? -1 : 1,
     (d) => (d.routePath?.endsWith('/') ? -1 : 1),
     (d) => d.routePath,
   ]).filter((d) => ![`/${rootPathId}`].includes(d.routePath || ''))
@@ -542,7 +551,7 @@ export const Route = createAPIFileRoute('${escapedRoutePath}')({
   const sortedRouteNodes = multiSortBy(routeNodes, [
     (d) => (d.routePath?.includes(`/${rootPathId}`) ? -1 : 1),
     (d) => d.routePath?.split('/').length,
-    (d) => (d.routePath?.endsWith("index'") ? -1 : 1),
+    (d) => (d.routePath?.endsWith(config.indexToken) ? -1 : 1),
     (d) => d,
   ])
 
@@ -1044,13 +1053,14 @@ export type StartAPIRoutePathSegment = {
  */
 export function startAPIRouteSegmentsFromTSRFilePath(
   src: string,
+  config: Config,
 ): Array<StartAPIRoutePathSegment> {
   const routePath = determineInitialRoutePath(src)
 
   const parts = routePath
     .replaceAll('.', '/')
     .split('/')
-    .filter((p) => !!p && p !== 'index')
+    .filter((p) => !!p && p !== config.indexToken)
   const segments: Array<StartAPIRoutePathSegment> = parts.map((part) => {
     if (part.startsWith('$')) {
       if (part === '$') {
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index 2a2fe97f8..776a2c63f 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-plugin",
-  "version": "1.51.6",
+  "version": "1.52.0",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-plugin/src/core/router-code-splitter-plugin.ts b/packages/router-plugin/src/core/router-code-splitter-plugin.ts
index 54264722c..6498eab42 100644
--- a/packages/router-plugin/src/core/router-code-splitter-plugin.ts
+++ b/packages/router-plugin/src/core/router-code-splitter-plugin.ts
@@ -172,7 +172,7 @@ export const unpluginRouterCodeSplitterFactory: UnpluginFactory<
       configResolved(config) {
         ROOT = config.root
 
-        userConfig = CHECK_USER_FLAGS_TO_BE_CHANGED(getConfig(options, ROOT))
+        userConfig = getConfig(options, ROOT)
       },
     },
 
@@ -193,7 +193,7 @@ export const unpluginRouterCodeSplitterFactory: UnpluginFactory<
         )
       })
 
-      userConfig = CHECK_USER_FLAGS_TO_BE_CHANGED(getConfig(options, ROOT))
+      userConfig = getConfig(options, ROOT)
     },
 
     webpack(compiler) {
@@ -213,7 +213,7 @@ export const unpluginRouterCodeSplitterFactory: UnpluginFactory<
         )
       })
 
-      userConfig = CHECK_USER_FLAGS_TO_BE_CHANGED(getConfig(options, ROOT))
+      userConfig = getConfig(options, ROOT)
 
       if (
         userConfig.autoCodeSplitting &&
@@ -229,18 +229,3 @@ export const unpluginRouterCodeSplitterFactory: UnpluginFactory<
     },
   }
 }
-
-function CHECK_USER_FLAGS_TO_BE_CHANGED(config: Config): Config {
-  if (typeof config.experimental?.enableCodeSplitting !== 'undefined') {
-    const message = `
-------
-⚠️ ⚠️ ⚠️
-ERROR: The "experimental.enableCodeSplitting" flag has been made stable and is now "autoCodeSplitting". Please update your configuration file to use "autoCodeSplitting" instead of "experimental.enableCodeSplitting".
-------
-`
-    console.error(message)
-    throw new Error(message)
-  }
-
-  return config
-}
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index f5f3c75a1..5f77eb72d 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-vite-plugin",
-  "version": "1.51.6",
+  "version": "1.52.0",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/start/package.json b/packages/start/package.json
index c4930cfdd..4c0e002e2 100644
--- a/packages/start/package.json
+++ b/packages/start/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/start",
-  "version": "1.51.9",
+  "version": "1.52.0",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts
index 10efa04d2..8c42a3f70 100644
--- a/packages/start/src/config/index.ts
+++ b/packages/start/src/config/index.ts
@@ -4,9 +4,10 @@ import { readFile } from 'node:fs/promises'
 import { fileURLToPath } from 'node:url'
 import reactRefresh from '@vitejs/plugin-react'
 import { resolve } from 'import-meta-resolve'
-import { TanStackRouterVite, configSchema } from '@tanstack/router-plugin/vite'
+import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
 import { TanStackStartVite } from '@tanstack/start-vite-plugin'
 import {
+  configSchema,
   getConfig,
   startAPIRouteSegmentsFromTSRFilePath,
 } from '@tanstack/router-generator'
@@ -626,7 +627,10 @@ function tsrFileRouter(opts: {
       toPath(src: string): string {
         const inputPath = vinxiFsRouterCleanPath(src, this.config)
 
-        const segments = startAPIRouteSegmentsFromTSRFilePath(inputPath)
+        const segments = startAPIRouteSegmentsFromTSRFilePath(
+          inputPath,
+          opts.tsrConfig,
+        )
 
         const pathname = segments
           .map((part) => {


Test patch:
diff --git a/packages/router-generator/tests/generator.test.ts b/packages/router-generator/tests/generator.test.ts
index 218c1bda3..a0cc94274 100644
--- a/packages/router-generator/tests/generator.test.ts
+++ b/packages/router-generator/tests/generator.test.ts
@@ -47,6 +47,10 @@ function rewriteConfigByFolderName(folderName: string, config: Config) {
     case 'no-manifest':
       config.disableManifestGeneration = true
       break
+    case 'custom-tokens':
+      config.indexToken = '_1nd3x'
+      config.routeToken = '_r0ut3_'
+      break
     default:
       break
   }
diff --git a/packages/router-generator/tests/generator/custom-tokens/routeTree.snapshot.ts b/packages/router-generator/tests/generator/custom-tokens/routeTree.snapshot.ts
new file mode 100644
index 000000000..3fa9ec1f8
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routeTree.snapshot.ts
@@ -0,0 +1,193 @@
+/* prettier-ignore-start */
+
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file is auto-generated by TanStack Router
+
+// Import Routes
+
+import { Route as rootRoute } from './routes/__root'
+import { Route as PostsR0ut3Import } from './routes/posts/_r0ut3_'
+import { Route as BlogR0ut3Import } from './routes/blog/_r0ut3_'
+import { Route as R1nd3xImport } from './routes/_1nd3x'
+import { Route as Posts1nd3xImport } from './routes/posts/_1nd3x'
+import { Route as Blog1nd3xImport } from './routes/blog/_1nd3x'
+import { Route as BlogSlugImport } from './routes/blog/$slug'
+import { Route as PostsPostId1nd3xImport } from './routes/posts/$postId/_1nd3x'
+import { Route as PostsPostIdDeepImport } from './routes/posts/$postId/deep'
+
+// Create/Update Routes
+
+const PostsR0ut3Route = PostsR0ut3Import.update({
+  path: '/posts',
+  getParentRoute: () => rootRoute,
+} as any)
+
+const BlogR0ut3Route = BlogR0ut3Import.update({
+  path: '/blog',
+  getParentRoute: () => rootRoute,
+} as any)
+
+const R1nd3xRoute = R1nd3xImport.update({
+  path: '/',
+  getParentRoute: () => rootRoute,
+} as any)
+
+const Posts1nd3xRoute = Posts1nd3xImport.update({
+  path: '/',
+  getParentRoute: () => PostsR0ut3Route,
+} as any)
+
+const Blog1nd3xRoute = Blog1nd3xImport.update({
+  path: '/',
+  getParentRoute: () => BlogR0ut3Route,
+} as any)
+
+const BlogSlugRoute = BlogSlugImport.update({
+  path: '/$slug',
+  getParentRoute: () => BlogR0ut3Route,
+} as any)
+
+const PostsPostId1nd3xRoute = PostsPostId1nd3xImport.update({
+  path: '/$postId/',
+  getParentRoute: () => PostsR0ut3Route,
+} as any)
+
+const PostsPostIdDeepRoute = PostsPostIdDeepImport.update({
+  path: '/$postId/deep',
+  getParentRoute: () => PostsR0ut3Route,
+} as any)
+
+// Populate the FileRoutesByPath interface
+
+declare module '@tanstack/react-router' {
+  interface FileRoutesByPath {
+    '/': {
+      id: '/'
+      path: '/'
+      fullPath: '/'
+      preLoaderRoute: typeof R1nd3xImport
+      parentRoute: typeof rootRoute
+    }
+    '/blog': {
+      id: '/blog'
+      path: '/blog'
+      fullPath: '/blog'
+      preLoaderRoute: typeof BlogR0ut3Import
+      parentRoute: typeof rootRoute
+    }
+    '/posts': {
+      id: '/posts'
+      path: '/posts'
+      fullPath: '/posts'
+      preLoaderRoute: typeof PostsR0ut3Import
+      parentRoute: typeof rootRoute
+    }
+    '/blog/$slug': {
+      id: '/blog/$slug'
+      path: '/$slug'
+      fullPath: '/blog/$slug'
+      preLoaderRoute: typeof BlogSlugImport
+      parentRoute: typeof BlogR0ut3Import
+    }
+    '/blog/': {
+      id: '/blog/'
+      path: '/'
+      fullPath: '/blog/'
+      preLoaderRoute: typeof Blog1nd3xImport
+      parentRoute: typeof BlogR0ut3Import
+    }
+    '/posts/': {
+      id: '/posts/'
+      path: '/'
+      fullPath: '/posts/'
+      preLoaderRoute: typeof Posts1nd3xImport
+      parentRoute: typeof PostsR0ut3Import
+    }
+    '/posts/$postId/deep': {
+      id: '/posts/$postId/deep'
+      path: '/$postId/deep'
+      fullPath: '/posts/$postId/deep'
+      preLoaderRoute: typeof PostsPostIdDeepImport
+      parentRoute: typeof PostsR0ut3Import
+    }
+    '/posts/$postId/': {
+      id: '/posts/$postId/'
+      path: '/$postId'
+      fullPath: '/posts/$postId'
+      preLoaderRoute: typeof PostsPostId1nd3xImport
+      parentRoute: typeof PostsR0ut3Import
+    }
+  }
+}
+
+// Create and export the route tree
+
+export const routeTree = rootRoute.addChildren({
+  R1nd3xRoute,
+  BlogR0ut3Route: BlogR0ut3Route.addChildren({ BlogSlugRoute, Blog1nd3xRoute }),
+  PostsR0ut3Route: PostsR0ut3Route.addChildren({
+    Posts1nd3xRoute,
+    PostsPostIdDeepRoute,
+    PostsPostId1nd3xRoute,
+  }),
+})
+
+/* prettier-ignore-end */
+
+/* ROUTE_MANIFEST_START
+{
+  "routes": {
+    "__root__": {
+      "filePath": "__root.tsx",
+      "children": [
+        "/",
+        "/blog",
+        "/posts"
+      ]
+    },
+    "/": {
+      "filePath": "_1nd3x.tsx"
+    },
+    "/blog": {
+      "filePath": "blog/_r0ut3_.tsx",
+      "children": [
+        "/blog/$slug",
+        "/blog/"
+      ]
+    },
+    "/posts": {
+      "filePath": "posts/_r0ut3_.tsx",
+      "children": [
+        "/posts/",
+        "/posts/$postId/deep",
+        "/posts/$postId/"
+      ]
+    },
+    "/blog/$slug": {
+      "filePath": "blog/$slug.tsx",
+      "parent": "/blog"
+    },
+    "/blog/": {
+      "filePath": "blog/_1nd3x.tsx",
+      "parent": "/blog"
+    },
+    "/posts/": {
+      "filePath": "posts/_1nd3x.tsx",
+      "parent": "/posts"
+    },
+    "/posts/$postId/deep": {
+      "filePath": "posts/$postId/deep.tsx",
+      "parent": "/posts"
+    },
+    "/posts/$postId/": {
+      "filePath": "posts/$postId/_1nd3x.tsx",
+      "parent": "/posts"
+    }
+  }
+}
+ROUTE_MANIFEST_END */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/_1nd3x.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/_1nd3x.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/_1nd3x.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/__root.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/__root.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/__root.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/blog/$slug.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/blog/$slug.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/blog/$slug.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/blog/_1nd3x.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/blog/_1nd3x.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/blog/_1nd3x.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/blog/_r0ut3_.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/blog/_r0ut3_.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/blog/_r0ut3_.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/_1nd3x.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/_1nd3x.tsx
new file mode 100644
index 000000000..79a9626b5
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/_1nd3x.tsx
@@ -0,0 +1,1 @@
+/* */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/deep.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/deep.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/posts/$postId/deep.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/posts/_1nd3x.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/posts/_1nd3x.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/posts/_1nd3x.tsx
@@ -0,0 +1,1 @@
+/** */
diff --git a/packages/router-generator/tests/generator/custom-tokens/routes/posts/_r0ut3_.tsx b/packages/router-generator/tests/generator/custom-tokens/routes/posts/_r0ut3_.tsx
new file mode 100644
index 000000000..ab504e42e
--- /dev/null
+++ b/packages/router-generator/tests/generator/custom-tokens/routes/posts/_r0ut3_.tsx
@@ -0,0 +1,1 @@
+/** */