From 8637f4d7b5723bc2297c5586b0c94e1a19609805 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Tue, 28 Jul 2026 23:38:40 +0200 Subject: [PATCH 1/3] router v1 --- src/routes/solid-start/v2/(0)index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/(0)index.mdx b/src/routes/solid-start/v2/(0)index.mdx index 8b4457880..fdefbcdb5 100644 --- a/src/routes/solid-start/v2/(0)index.mdx +++ b/src/routes/solid-start/v2/(0)index.mdx @@ -16,7 +16,7 @@ description: >- Vite-based configuration. --- -SolidStart v2 builds a full-stack app on top of [Solid v1](/), [Solid Router](/solid-router), and [Vite 8+](https://vite.dev). It uses Vite's Environment API for client and server builds and works with deployment Vite plugins such as [Nitro v3](https://nitro.build) and the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin). +SolidStart v2 builds a full-stack app on top of [Solid v1](/), [Solid Router v1](/solid-router), and [Vite v8+](https://vite.dev). It uses Vite's Environment API for client and server builds and works with deployment Vite plugins such as [Nitro v3](https://nitro.build) and the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin). The framework is split into a handful of entry points: From faaf2ad6a100904898107205f47de84dd37d83e8 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Tue, 28 Jul 2026 23:45:43 +0200 Subject: [PATCH 2/3] adjust docs to latest rc release --- .../solid-start/v2/(1)getting-started.mdx | 8 +++++ .../v2/reference/config/solid-start.mdx | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/routes/solid-start/v2/(1)getting-started.mdx b/src/routes/solid-start/v2/(1)getting-started.mdx index 14ca5604d..048a84911 100644 --- a/src/routes/solid-start/v2/(1)getting-started.mdx +++ b/src/routes/solid-start/v2/(1)getting-started.mdx @@ -68,6 +68,14 @@ export default defineConfig({ Use the top-level `nitro` property for Nitro options such as deployment presets, prerendering, tasks, and WebSockets. +## Path alias + +SolidStart provides a built-in `~` alias for the application root. With the default [`appRoot`](/solid-start/v2/reference/config/solid-start#approot), an import from `~/lib/db` resolves to `src/lib/db`. + +```ts +import { db } from "~/lib/db"; +``` + ## Development toolbar During development, SolidStart adds a toolbar for inspecting application errors and server function calls. The toolbar is not included in production builds. diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index 100d4992a..d28e3a09c 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -133,6 +133,38 @@ solidStart({ }); ``` +### `serverFunctions.onError` + +- **Type:** `string` + +Path to a module whose default export handles values thrown by server functions before SolidStart serializes them into a response. + +The handler can report the original value and return a safer replacement for the client. Return `undefined` to preserve the original value. The module is bundled only into the server, so it can import server-only code. + +```tsx title="vite.config.ts" +solidStart({ + serverFunctions: { + onError: "src/server-function-error.ts", + }, +}); +``` + +```ts title="src/server-function-error.ts" +import type { ServerFunctionErrorHandler } from "@solidjs/start/server"; + +const onServerFunctionError: ServerFunctionErrorHandler = (thrown) => { + console.error(thrown); + + if (thrown instanceof Error) { + return new Error("The server function failed."); + } + + return undefined; +}; + +export default onServerFunctionError; +``` + ### `env` Configures SolidStart's environment-variable virtual modules. From ba9fabcd9023ca15ad7365b92237f5bfa49768c6 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 02:50:50 +0200 Subject: [PATCH 3/3] chore: adjust docs to start v2 rc.6 --- src/routes/solid-start/v2/(0)index.mdx | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/routes/solid-start/v2/(0)index.mdx b/src/routes/solid-start/v2/(0)index.mdx index fdefbcdb5..202b307dc 100644 --- a/src/routes/solid-start/v2/(0)index.mdx +++ b/src/routes/solid-start/v2/(0)index.mdx @@ -16,29 +16,12 @@ description: >- Vite-based configuration. --- -SolidStart v2 builds a full-stack app on top of [Solid v1](/), [Solid Router v1](/solid-router), and [Vite v8+](https://vite.dev). It uses Vite's Environment API for client and server builds and works with deployment Vite plugins such as [Nitro v3](https://nitro.build) and the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin). +SolidStart v2 builds a full-stack app on top of [Solid v1](/) and [Vite v8+](https://vite.dev). If you're currently using SolidStart v1, it's mainly a tooling and stability upgrade. -The framework is split into a handful of entry points: +What's new in SolidStart v2 is that it uses Vite's Environment API for client and server builds and therefore works with deployment plugins such as [Nitro v3](https://nitro.build) and the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin). -- `@solidjs/start/config` for the `solidStart()` Vite plugin -- `@solidjs/start/router` for file-routed UI integration -- `@solidjs/start/server` for server rendering helpers and server-side types -- `@solidjs/start/http` for request, response, cookie, and session helpers -- `@solidjs/start/middleware` for middleware composition +SolidStart is router agnostic, and can be used with either the official [Solid Router v1](/solid-router) or [TanStack Solid Router v1](https://tanstack.com/router/latest). -SolidStart v2 requires Node.js 24 or newer and Vite 8 or 9. - -## What v2 keeps - -The core model carries over from v1: - -- File-based routing from `src/routes` -- API route handlers exported by HTTP method name -- Server-backed data loading and mutation with `query` and `action` -- Server-only code compiled from the `"use server"` directive - -## What changed from v1 - -Configuration moved from `app.config.ts` to `vite.config.ts`. The `solidStart()` plugin configures the application, while a deployment Vite plugin configures the server runtime and deployment target. +## Migrating from SolidStart v1 If you are upgrading an existing app, start with the [migration guide](/solid-start/v2/migrating-from-v1).