Conversation
WalkthroughLarge documentation migration: many React-targeted Start docs were rewritten or replaced with Solid-specific front matter and comprehensive Solid/TanStack Start guides; minor React docs update switching config references to vite.config.ts and small formatting tweaks. No runtime code changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant C as Solid Client
participant SF as Server Functions
participant S as Session Store
participant SR as Server Routes
U->>C: submit login form
C->>SF: serverFn.login(credentials)
activate SF
SF->>SF: validate credentials
SF-->>S: set session cookie
SF-->>C: return user
deactivate SF
C->>SR: request protected route (with cookie)
SR->>S: read session
alt authenticated
SR-->>C: 200 + data
else not authenticated
SR-->>C: 302 redirect to /login
end
U->>C: click logout
C->>SF: serverFn.logout()
SF->>S: clear session
SF-->>C: success
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🧰 Additional context used📓 Path-based instructions (2)docs/**/*.{md,mdx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/{router,start}/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 33da42a
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/nitro-v2-vite-plugin
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-static-server-functions
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/start/framework/react/server-routes.md (1)
456-468: Restore the missing closing brace in the example.The
serverobject isn’t closed anymore, so the example no longer parses. Please add the closing},before the final}).export const Route = createFileRoute('/hello')({ server: { handlers: { GET: async ({ request }) => { return new Response('Hello, World!', { headers: { 'Content-Type': 'text/plain', }, }) }, }, - }) + }, +})
🧹 Nitpick comments (2)
docs/start/framework/solid/quick-start.md (1)
10-18: Label the shell snippets for markdownlint.
MD040is firing because these fences aren’t typed. Addingbashkeeps lint green.-``` +```bash pnpm create @tanstack/start@latestor
-
+bash
npm create @tanstack/start@latestdocs/start/framework/solid/server-routes.md (1)
103-106: Swap the absolute docs link for a relative one.Docs convention prefers relative paths from
docs/; the absolute/router/...link breaks that rule. As per coding guidelines.-You can read more about this in the [TanStack Router File-based Routing Guide](/router/latest/docs/framework/solid/routing/file-based-routing#s-or-s). +You can read more about this in the [TanStack Router File-based Routing Guide](../../../../router/framework/solid/routing/file-based-routing#s-or-s).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
docs/start/framework/react/path-aliases.md(1 hunks)docs/start/framework/react/server-routes.md(3 hunks)docs/start/framework/solid/authentication.md(1 hunks)docs/start/framework/solid/build-from-scratch.md(1 hunks)docs/start/framework/solid/client-entry-point.md(1 hunks)docs/start/framework/solid/code-execution-patterns.md(1 hunks)docs/start/framework/solid/environment-variables.md(1 hunks)docs/start/framework/solid/execution-model.md(1 hunks)docs/start/framework/solid/getting-started.md(1 hunks)docs/start/framework/solid/hosting.md(1 hunks)docs/start/framework/solid/observability.md(1 hunks)docs/start/framework/solid/quick-start.md(1 hunks)docs/start/framework/solid/routing.md(1 hunks)docs/start/framework/solid/selective-ssr.md(1 hunks)docs/start/framework/solid/server-functions.md(1 hunks)docs/start/framework/solid/server-routes.md(1 hunks)docs/start/framework/solid/static-prerendering.md(1 hunks)docs/start/framework/solid/tailwind-integration.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (AGENTS.md)
Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)
Files:
docs/start/framework/solid/server-functions.mddocs/start/framework/solid/hosting.mddocs/start/framework/solid/routing.mddocs/start/framework/solid/selective-ssr.mddocs/start/framework/solid/client-entry-point.mddocs/start/framework/solid/observability.mddocs/start/framework/solid/quick-start.mddocs/start/framework/solid/execution-model.mddocs/start/framework/react/server-routes.mddocs/start/framework/solid/static-prerendering.mddocs/start/framework/solid/environment-variables.mddocs/start/framework/solid/getting-started.mddocs/start/framework/solid/code-execution-patterns.mddocs/start/framework/solid/tailwind-integration.mddocs/start/framework/solid/build-from-scratch.mddocs/start/framework/solid/server-routes.mddocs/start/framework/react/path-aliases.mddocs/start/framework/solid/authentication.md
docs/{router,start}/**
📄 CodeRabbit inference engine (AGENTS.md)
Place router docs under docs/router/ and start framework docs under docs/start/
Files:
docs/start/framework/solid/server-functions.mddocs/start/framework/solid/hosting.mddocs/start/framework/solid/routing.mddocs/start/framework/solid/selective-ssr.mddocs/start/framework/solid/client-entry-point.mddocs/start/framework/solid/observability.mddocs/start/framework/solid/quick-start.mddocs/start/framework/solid/execution-model.mddocs/start/framework/react/server-routes.mddocs/start/framework/solid/static-prerendering.mddocs/start/framework/solid/environment-variables.mddocs/start/framework/solid/getting-started.mddocs/start/framework/solid/code-execution-patterns.mddocs/start/framework/solid/tailwind-integration.mddocs/start/framework/solid/build-from-scratch.mddocs/start/framework/solid/server-routes.mddocs/start/framework/react/path-aliases.mddocs/start/framework/solid/authentication.md
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Applied to files:
docs/start/framework/solid/server-functions.md
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/
Applied to files:
docs/start/framework/solid/routing.md
🪛 markdownlint-cli2 (0.18.1)
docs/start/framework/solid/hosting.md
10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
16-16: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/start/framework/solid/quick-start.md
10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
16-16: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/start/framework/solid/environment-variables.md
94-94: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/start/framework/solid/build-from-scratch.md
115-115: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Preview
- GitHub Check: Test
| > [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead. | ||
|
|
There was a problem hiding this comment.
Fix the malformed note block.
> [!NOTE] > ... won’t render—split the label and content onto separate lines so the admonition shows up.
-> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
+> [!NOTE]
+> We use `npm` in all of these examples, but you can use your package manager of choice instead.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead. | |
| > [!NOTE] | |
| > We use `npm` in all of these examples, but you can use your package manager of choice instead. |
🤖 Prompt for AI Agents
In docs/start/framework/solid/build-from-scratch.md around lines 25 to 26, the
note admonition is malformed because the label and content are on the same line
(`> [!NOTE] > ...`); split them so the label line contains only `> [!NOTE]` and
the next line(s) contain the note content (e.g., `> We use npm ...`) to render
the admonition correctly.
|
|
||
| ``` | ||
| . | ||
| ├── src/ | ||
| │ ├── routes/ | ||
| │ │ └── `__root.tsx` | ||
| │ ├── `router.tsx` | ||
| │ ├── `routeTree.gen.ts` | ||
| ├── `vite.config.ts` | ||
| ├── `package.json` | ||
| └── `tsconfig.json` | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the file-tree fence.
markdownlint (MD040) fails because this fence lacks a language. Tag it (e.g. text) to unblock the pipeline. Based on static analysis hints.
-```
+```text
.
├── src/
│ ├── routes/
│ │ └── `__root.tsx`
│ ├── `router.tsx`
│ ├── `routeTree.gen.ts`
├── `vite.config.ts`
├── `package.json`
└── `tsconfig.json`🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
115-115: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In docs/start/framework/solid/build-from-scratch.md around lines 114 to 125, the
fenced code block showing the file tree lacks a language tag causing
markdownlint MD040; update the opening fence to include a language identifier
(for example change ``` to ```text) so the block reads as a text code fence,
preserving the content exactly and leaving the closing ``` unchanged.
| ``` | ||
| .env.local # Local overrides (add to .gitignore) | ||
| .env.production # Production-specific variables | ||
| .env.development # Development-specific variables | ||
| .env # Default variables (commit to git) | ||
| ``` |
There was a problem hiding this comment.
Label the file-tree fence.
markdownlint (MD040) flags this unlabeled fence; add a language (e.g. text) so docs build cleanly. Based on static analysis hints.
-```
+```text
.env.local # Local overrides (add to .gitignore)
.env.production # Production-specific variables
.env.development # Development-specific variables
.env # Default variables (commit to git)🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
94-94: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In docs/start/framework/solid/environment-variables.md around lines 94 to 99,
the fenced code block lacks a language label which triggers markdownlint MD040;
add a language identifier (e.g., text) immediately after the opening backticks
so the fence is labeled and the docs build cleanly.
| - [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable | ||
| - [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks | ||
| - [Quick Start Examples](../quick-start) Download or clone one of our official examples | ||
| - [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file. |
There was a problem hiding this comment.
Add the missing CLI link.
[TanStack Start CLI] renders as literal text because no href is attached. Give it a real target (e.g. docs or repo URL) so the callout works.
-- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
+- [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable | |
| - [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks | |
| - [Quick Start Examples](../quick-start) Download or clone one of our official examples | |
| - [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file. | |
| - [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable | |
| - [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks | |
| - [Quick Start Examples](../quick-start) Download or clone one of our official examples | |
| - [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file. |
🤖 Prompt for AI Agents
In docs/start/framework/solid/getting-started.md around lines 10 to 13 the
`[TanStack Start CLI]` text has no href so it renders as literal; update that
markdown to include a proper link target (for example the CLI docs or the repo
URL) by turning the bracketed text into a linked form with the chosen URL and
ensure the link follows the same style as the other entries so the callout
renders correctly.
| const data = Route.useLoaderData() | ||
|
|
||
| // Track client-side render time | ||
| Solid.createEffect(() => { | ||
| const renderTime = performance.now() | ||
| console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`) | ||
| }) | ||
|
|
There was a problem hiding this comment.
Import and use createEffect directly.
Solid.createEffect will throw because Solid isn’t defined. Import createEffect (or namespace Solid) before using it.
-import { createFileRoute } from '@tanstack/solid-router'
+import { createFileRoute } from '@tanstack/solid-router'
+import { createEffect } from 'solid-js'
...
- Solid.createEffect(() => {
+ createEffect(() => {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const data = Route.useLoaderData() | |
| // Track client-side render time | |
| Solid.createEffect(() => { | |
| const renderTime = performance.now() | |
| console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`) | |
| }) | |
| import { createFileRoute } from '@tanstack/solid-router' | |
| import { createEffect } from 'solid-js' | |
| const data = Route.useLoaderData() | |
| // Track client-side render time | |
| createEffect(() => { | |
| const renderTime = performance.now() | |
| console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`) | |
| }) |
🤖 Prompt for AI Agents
In docs/start/framework/solid/observability.md around lines 169 to 176, the code
calls Solid.createEffect but the Solid namespace isn't defined; import
createEffect from "solid-js" (or import * as Solid and use Solid.createEffect)
at the top of the file and replace Solid.createEffect(...) with
createEffect(...) (or keep Solid.createEffect if you choose the namespace
import) so the effect call resolves correctly.
| // src/routes/__root.tsx | ||
| import { | ||
| Outlet, | ||
| createRootRoute, | ||
| HeadContent, | ||
| Scripts, | ||
| } from '@tanstack/solid-router' | ||
| import type { solidNode } from 'solid' | ||
|
|
||
| export const Route = createRootRoute({ | ||
| head: () => ({ | ||
| meta: [ | ||
| { | ||
| charSet: 'utf-8', | ||
| }, | ||
| { | ||
| name: 'viewport', | ||
| content: 'width=device-width, initial-scale=1', | ||
| }, | ||
| { | ||
| title: 'TanStack Start Starter', | ||
| }, | ||
| ], | ||
| }), | ||
| component: RootComponent, | ||
| }) | ||
|
|
||
| function RootComponent() { | ||
| return ( | ||
| <RootDocument> | ||
| <Outlet /> | ||
| </RootDocument> | ||
| ) | ||
| } | ||
|
|
||
| function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) { | ||
| return ( | ||
| <> | ||
| <HeadContent /> | ||
| {children} | ||
| <Scripts /> | ||
| </> | ||
| ) | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Fix the Solid import/type usage in the root-route snippet.
import type { solidNode } from 'solid' doesn’t exist, and Solid is undefined when you reference Solid.JSX.Element. Import JSX from solid-js (or namespace Solid) and update the type to keep the sample compilable.
-import {
- Outlet,
- createRootRoute,
- HeadContent,
- Scripts,
-} from '@tanstack/solid-router'
-import type { solidNode } from 'solid'
+import {
+ Outlet,
+ createRootRoute,
+ HeadContent,
+ Scripts,
+} from '@tanstack/solid-router'
+import type { JSX } from 'solid-js'
...
-function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
+function RootDocument({ children }: Readonly<{ children: JSX.Element }>) {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // src/routes/__root.tsx | |
| import { | |
| Outlet, | |
| createRootRoute, | |
| HeadContent, | |
| Scripts, | |
| } from '@tanstack/solid-router' | |
| import type { solidNode } from 'solid' | |
| export const Route = createRootRoute({ | |
| head: () => ({ | |
| meta: [ | |
| { | |
| charSet: 'utf-8', | |
| }, | |
| { | |
| name: 'viewport', | |
| content: 'width=device-width, initial-scale=1', | |
| }, | |
| { | |
| title: 'TanStack Start Starter', | |
| }, | |
| ], | |
| }), | |
| component: RootComponent, | |
| }) | |
| function RootComponent() { | |
| return ( | |
| <RootDocument> | |
| <Outlet /> | |
| </RootDocument> | |
| ) | |
| } | |
| function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) { | |
| return ( | |
| <> | |
| <HeadContent /> | |
| {children} | |
| <Scripts /> | |
| </> | |
| ) | |
| } | |
| ``` | |
| // src/routes/__root.tsx | |
| import { | |
| Outlet, | |
| createRootRoute, | |
| HeadContent, | |
| Scripts, | |
| } from '@tanstack/solid-router' | |
| import type { JSX } from 'solid-js' | |
| export const Route = createRootRoute({ | |
| head: () => ({ | |
| meta: [ | |
| { | |
| charSet: 'utf-8', | |
| }, | |
| { | |
| name: 'viewport', | |
| content: 'width=device-width, initial-scale=1', | |
| }, | |
| { | |
| title: 'TanStack Start Starter', | |
| }, | |
| ], | |
| }), | |
| component: RootComponent, | |
| }) | |
| function RootComponent() { | |
| return ( | |
| <RootDocument> | |
| <Outlet /> | |
| </RootDocument> | |
| ) | |
| } | |
| function RootDocument({ children }: Readonly<{ children: JSX.Element }>) { | |
| return ( | |
| <> | |
| <HeadContent /> | |
| {children} | |
| <Scripts /> | |
| </> | |
| ) | |
| } |
🤖 Prompt for AI Agents
In docs/start/framework/solid/routing.md around lines 71 to 115, the snippet
incorrectly imports and references Solid types: `import type { solidNode } from
'solid'` and uses `Solid.JSX.Element`, which don't exist; replace that import
with a proper JSX type import (e.g., `import type { JSX } from 'solid-js'`) and
update the component prop type to `children: JSX.Element` (or alternatively
import the namespace `* as Solid from 'solid-js'` and keep `Solid.JSX.Element`)
so the example compiles.
| ├── __root.tsx <-- Renders the <Root> component | ||
| ├── posts.tsx <-- Renders the <Posts> component | ||
| ├── posts.$postId.tsx <-- Renders the <Post> component | ||
| ``` |
There was a problem hiding this comment.
Correct the dynamic route filename.
The example shows posts.$postId.tsx, but the actual file should live at posts/$postId.tsx. Update the tree so newcomers don’t create the wrong file.
-├── posts.$postId.tsx <-- Renders the <Post> component
+├── posts/$postId.tsx <-- Renders the <Post> component📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ├── __root.tsx <-- Renders the <Root> component | |
| ├── posts.tsx <-- Renders the <Posts> component | |
| ├── posts.$postId.tsx <-- Renders the <Post> component | |
| ``` | |
| ├── __root.tsx <-- Renders the <Root> component | |
| ├── posts.tsx <-- Renders the <Posts> component | |
| ├── posts/$postId.tsx <-- Renders the <Post> component |
🤖 Prompt for AI Agents
In docs/start/framework/solid/routing.md around lines 156 to 159, the route
example shows an incorrect filename `posts.$postId.tsx`; update the tree to use
the correct dynamic route path `posts/$postId.tsx` (i.e., change the dotted
filename to a directory with a dollar-prefixed file) so the example reflects the
actual filesystem layout newcomers must create.
| // routes/hello.ts | ||
| import { createFileRoute } from '@tanstack/solid-router' | ||
| export const Route = createFileRoute('/hello')({ | ||
| server: { | ||
| handlers: { | ||
| GET: async ({ request }) => { | ||
| return new Response('Hello, World!', { | ||
| headers: { | ||
| 'Content-Type': 'text/plain', | ||
| }, | ||
| }) | ||
| }, | ||
| }, | ||
| }) | ||
| // Visit /hello to see the response |
There was a problem hiding this comment.
Close the server block in this snippet.
The example lost its }, so it won’t compile when copied. Please restore the brace before }).
export const Route = createFileRoute('/hello')({
server: {
handlers: {
GET: async ({ request }) => {
return new Response('Hello, World!', {
headers: {
'Content-Type': 'text/plain',
},
})
},
},
- })
+ },
+})📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // routes/hello.ts | |
| import { createFileRoute } from '@tanstack/solid-router' | |
| export const Route = createFileRoute('/hello')({ | |
| server: { | |
| handlers: { | |
| GET: async ({ request }) => { | |
| return new Response('Hello, World!', { | |
| headers: { | |
| 'Content-Type': 'text/plain', | |
| }, | |
| }) | |
| }, | |
| }, | |
| }) | |
| // Visit /hello to see the response | |
| // routes/hello.ts | |
| import { createFileRoute } from '@tanstack/solid-router' | |
| export const Route = createFileRoute('/hello')({ | |
| server: { | |
| handlers: { | |
| GET: async ({ request }) => { | |
| return new Response('Hello, World!', { | |
| headers: { | |
| 'Content-Type': 'text/plain', | |
| }, | |
| }) | |
| }, | |
| }, | |
| }, | |
| }) | |
| // Visit /hello to see the response |
🤖 Prompt for AI Agents
In docs/start/framework/solid/server-routes.md around lines 454 to 468, the
example is missing the closing brace and comma for the server block before the
final }) call; restore the server block closure by adding the missing `},`
immediately before the `})` so the object literal is properly closed and the
snippet compiles.
| export default defineConfig({ | ||
| plugins: [ | ||
| tanstackStart({ | ||
| prerender: { | ||
| // Enable prerendering | ||
| enabled: true, | ||
|
|
||
| // Enable if you need pages to be at `/page/index.html` instead of `/page.html` | ||
| autoSubfolderIndex: true, | ||
|
|
||
| // How many prerender jobs to run at once | ||
| concurrency: 14, | ||
|
|
||
| // Whether to extract links from the HTML and prerender them also | ||
| crawlLinks: true, | ||
|
|
||
| // Filter function takes the page object and returns whether it should prerender | ||
| filter: ({ path }) => !path.startsWith('/do-not-render-me'), | ||
|
|
||
| // Number of times to retry a failed prerender job | ||
| retryCount: 2, | ||
|
|
||
| // Delay between retries in milliseconds | ||
| retryDelay: 1000, | ||
|
|
||
| // Callback when page is successfully rendered | ||
| onSuccess: ({ page }) => { | ||
| console.log(`Rendered ${page.path}!`) | ||
| }, | ||
| }, | ||
| // Optional configuration for specific pages (without this it will still automatically | ||
| // prerender all routes) | ||
| pages: [ | ||
| { | ||
| path: '/my-page', | ||
| prerender: { enabled: true, outputPath: '/my-page/index.html' }, | ||
| }, | ||
| ], | ||
| }), | ||
| viteSolid({ ssr: true }), | ||
| ], | ||
| }) |
There was a problem hiding this comment.
Add the missing defineConfig import.
The snippet calls defineConfig(...) but never imports it from vite, so copying this into vite.config.ts fails. Please add import { defineConfig } from 'vite' above the plugin imports.
🤖 Prompt for AI Agents
In docs/start/framework/solid/static-prerendering.md around lines 18 to 59, the
example calls defineConfig(...) but never imports it; add an import statement
for defineConfig from 'vite' at the top of the snippet (e.g., import {
defineConfig } from 'vite') so the example compiles when copied into a
vite.config.ts file.
* update solid start docs * rename app.config.ts
Updating the Tanstack Start for Solid docs by copying them over and making changes. I also made tweaks to two pages in the react docs
I didn't end up previewing them with Tanstack.com as I was getting an error. I will try again here shortly
Summary by CodeRabbit