Skip to content

Commit 2dc5e3d

Browse files
committed
feat: Add "disableTypes" option to route generation for JS users
1 parent 014d5e1 commit 2dc5e3d

File tree

14 files changed

+33
-59
lines changed

14 files changed

+33
-59
lines changed

docs/guide/file-based-routing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ The following options are available for configuration via the `tsr.config.json`
9797
- (Required) The path to the file where the generated route tree will be saved, relative to the cwd.
9898
- **`quoteStyle`**
9999
- (Optional, **Defaults to `single`**) whether to use `single` or `double` quotes when writing the route ids in `new FileRoute()`
100+
- **`disableTypes`**
101+
- (Optional, **Defaults to `false`**) whether to disable generating types for the route tree
102+
- If set to `true`, the generated route tree will not include any types.
103+
- If set to `true` and the `generatedRouteTree` file ends with `.ts` or `.tsx`, the generated route tree will be written as a `.js` file instead.
100104

101105
## File Naming Conventions
102106

examples/react/basic-file-based-codesplitting/tsr.config.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/react/basic-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/basic-react-query-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/basic-ssr-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/basic-ssr-streaming-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/kitchen-sink-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/kitchen-sink-react-query-file-based/tsr.config.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/react/quickstart-file-based/tsr.config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"rootDirectory": ".",
32
"routesDirectory": "./app/routes",
43
"generatedRouteTree": "./app/routeTree.gen.ts"
5-
}
4+
}

0 commit comments

Comments
 (0)