diff --git a/osmium/src/ui/layout/main-navigation.tsx b/osmium/src/ui/layout/main-navigation.tsx
index 758b65cdb7..5a72b1daa1 100644
--- a/osmium/src/ui/layout/main-navigation.tsx
+++ b/osmium/src/ui/layout/main-navigation.tsx
@@ -55,7 +55,7 @@ function DirList(props: { items: SidebarItem[] }) {
-
+
{child.title}
- getSolidBaseRouteFallbackOptions(config().routes, "version", current())
- );
+ const options = useSolidBaseRouteFallbackOptions("version");
const currentOption = createMemo(() =>
options().find((option) => option.name === current().version)
);
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7187064700..e8bed53247 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -7,8 +7,8 @@ settings:
catalogs:
default:
"@kobalte/solidbase":
- specifier: ^0.6.11
- version: 0.6.11
+ specifier: ^0.6.13
+ version: 0.6.13
overrides:
"@solidjs/router": ^0.16.3
@@ -21,7 +21,7 @@ importers:
version: 0.13.12(solid-js@1.9.12)
"@kobalte/solidbase":
specifier: "catalog:"
- version: 0.6.11(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))
+ version: 0.6.13(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))
"@solidjs/meta":
specifier: ^0.29.4
version: 0.29.4(solid-js@1.9.12)
@@ -121,7 +121,7 @@ importers:
version: 0.13.11(solid-js@1.9.12)
"@kobalte/solidbase":
specifier: "catalog:"
- version: 0.6.11(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))
+ version: 0.6.13(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))
"@kobalte/tailwindcss":
specifier: ^0.9.0
version: 0.9.0(tailwindcss@4.3.1)
@@ -882,10 +882,10 @@ packages:
peerDependencies:
solid-js: ^1.8.15
- "@kobalte/solidbase@0.6.11":
+ "@kobalte/solidbase@0.6.13":
resolution:
{
- integrity: sha512-OVj1Y3fX1Kz32kS6jdMXV9W8Lxr6dh/WgI0bFbtXTsp9QHIk4C0SZO+Our8vXKtm0Lnte9i3IFzxpt410QxosQ==,
+ integrity: sha512-rERXMPu+NiWqkB8EvHizUQareRqKVtUdCa0mjVIJtiJuUAmMR6M3VgHWH/C0llk/0ph/7VkYcwdbBXYLerDGtQ==,
}
engines: { node: ">=22" }
peerDependencies:
@@ -5688,7 +5688,7 @@ snapshots:
solid-presence: 0.1.8(solid-js@1.9.12)
solid-prevent-scroll: 0.1.10(solid-js@1.9.12)
- "@kobalte/solidbase@0.6.11(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))":
+ "@kobalte/solidbase@0.6.13(@solidjs/start@2.0.0-rc.1(crossws@0.4.10(srvx@0.11.22))(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0)))(solid-js@1.9.12)(vite@8.1.3(@types/node@25.9.5)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.9.0))":
dependencies:
"@alloc/quick-lru": 5.2.0
"@bprogress/core": 1.3.4
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index aaedbae956..11770cbcf1 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -10,7 +10,7 @@ packages:
- "osmium"
catalog:
- "@kobalte/solidbase": ^0.6.11
+ "@kobalte/solidbase": ^0.6.13
allowBuilds:
esbuild: true
diff --git a/src/middleware/legacy-routes-redirect.ts b/src/middleware/legacy-routes-redirect.ts
index 647d1b38b8..13e96c53c1 100644
--- a/src/middleware/legacy-routes-redirect.ts
+++ b/src/middleware/legacy-routes-redirect.ts
@@ -181,9 +181,12 @@ const LEGACY_ROUTES = {
"/solid-router/reference/response-helpers/revalidate":
"/solid-router/reference/data-apis/revalidate",
- "/solid-start/guides/data-loading": "/solid-start/guides/data-fetching",
+ "/solid-start/guides/data-loading": "/solid-start/v1/guides/data-fetching",
} as const;
+const SOLID_START_PATH = "/solid-start";
+const SOLID_START_VERSIONED_ROUTE = /^\/solid-start\/v\d+(?:\/|$)/;
+
function isLegacyRoute(path: string): path is keyof typeof LEGACY_ROUTES {
return path in LEGACY_ROUTES;
}
@@ -194,4 +197,21 @@ export const handleLegacyRoutes = (event: FetchEvent) => {
if (isLegacyRoute(pathname)) {
return redirect(LEGACY_ROUTES[pathname], 301);
}
+
+ if (pathname === SOLID_START_PATH || pathname === `${SOLID_START_PATH}/`) {
+ return redirect(
+ `${SOLID_START_PATH}/v2${pathname.endsWith("/") ? "/" : ""}`,
+ 301
+ );
+ }
+
+ if (
+ pathname.startsWith(`${SOLID_START_PATH}/`) &&
+ !SOLID_START_VERSIONED_ROUTE.test(pathname)
+ ) {
+ return redirect(
+ `${SOLID_START_PATH}/v1${pathname.slice(SOLID_START_PATH.length)}`,
+ 301
+ );
+ }
};
diff --git a/src/routes/(1)quick-start.mdx b/src/routes/(1)quick-start.mdx
index 33df4c74dc..c6c2854aa7 100644
--- a/src/routes/(1)quick-start.mdx
+++ b/src/routes/(1)quick-start.mdx
@@ -38,7 +38,7 @@ solid
```
This command installs and runs [create-solid](https://github.com/solidjs-community/solid-cli/tree/main/packages/create-solid), the official project scaffolding tool for Solid.
-The CLI will guide you through a series of prompts, allowing you to choose options such as [starter templates](https://github.com/solidjs/templates), TypeScript support, and whether to include [Solid's full-stack framework, SolidStart](/solid-start):
+The CLI will guide you through a series of prompts, allowing you to choose options such as [starter templates](https://github.com/solidjs/templates), TypeScript support, and whether to include [Solid's full-stack framework, SolidStart](/solid-start/v2):
```shell
◆ Project Name
diff --git a/src/routes/(2)guides/(1)deployment-options/aws-via-sst.mdx b/src/routes/(2)guides/(1)deployment-options/aws-via-sst.mdx
index 388fa0567c..52ad58fe23 100644
--- a/src/routes/(2)guides/(1)deployment-options/aws-via-sst.mdx
+++ b/src/routes/(2)guides/(1)deployment-options/aws-via-sst.mdx
@@ -1,5 +1,5 @@
---
-title: AWS via SST
+title: AWS via SST (SolidStart v1)
category: Guides / Deployment
order: 1
mainNavExclude: true
@@ -15,15 +15,19 @@ tags:
- containers
version: "1.0"
description: >-
- Deploy SolidStart apps to AWS Lambda or containers using SST framework with
- streamlined configuration and deployment.
+ Deploy SolidStart v1 apps to AWS Lambda or containers using SST framework
+ with streamlined configuration and deployment.
---
[SST](https://sst.dev/) is a framework for deploying applications to any cloud provider. It has a built-in way to deploy SolidStart apps to AWS Lambda. For additional details, you can [visit their docs](https://sst.dev/docs/).
+:::caution[SolidStart v1 only]
+SST's built-in `sst.aws.SolidStart` component currently expects `app.config.ts` and the Vinxi output used by SolidStart v1. It is not compatible with SolidStart v2's Vite-based build. For a SolidStart v2 app, see [Deployment plugins](/solid-start/v2/guides/deployment-plugins).
+:::
+
## Quick start
-1. [Create a SolidStart app](/solid-start/getting-started).
+1. [Create a SolidStart app](/solid-start/v1/getting-started).
2. In your project, init SST.
@@ -34,9 +38,16 @@ sst@latest init
3. This will detect your SolidStart app and ask you to update your `app.config.ts`.
```ts title="app.config.ts"
-server: {
- preset: "aws-lambda-streaming";
-}
+import { defineConfig } from "@solidjs/start/config";
+
+export default defineConfig({
+ server: {
+ preset: "aws-lambda",
+ awsLambda: {
+ streaming: true,
+ },
+ },
+});
```
4. When you are ready, you can deploy your app using:
diff --git a/src/routes/(2)guides/(5)testing.mdx b/src/routes/(2)guides/(5)testing.mdx
index e4c28b05c1..5846df5767 100644
--- a/src/routes/(2)guides/(5)testing.mdx
+++ b/src/routes/(2)guides/(5)testing.mdx
@@ -66,7 +66,7 @@ If using TypeScript, add `@testing-library/jest-dom` to `tsconfig.json#compilerO
#### SolidStart configuration
-When using [SolidStart](/solid-start), create a `vitest.config.ts` file:
+When using [SolidStart](/solid-start/v2), create a `vitest.config.ts` file:
```ts title="vitest.config.ts"
import solid from "vite-plugin-solid";
diff --git a/src/routes/solid-start/(0)building-your-application/(0)routing.mdx b/src/routes/solid-start/v1/(0)building-your-application/(0)routing.mdx
similarity index 97%
rename from src/routes/solid-start/(0)building-your-application/(0)routing.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(0)routing.mdx
index 0bf55774c5..1f80d3526a 100644
--- a/src/routes/solid-start/(0)building-your-application/(0)routing.mdx
+++ b/src/routes/solid-start/v1/(0)building-your-application/(0)routing.mdx
@@ -20,16 +20,16 @@ Routing serves as a key component of web applications.
Within SolidStart, there are two types:
- **UI routes** — define the user interface in your app
-- **[API routes](/solid-start/building-your-application/api-routes)** — define the serverless functions in your app
+- **[API routes](/solid-start/v1/building-your-application/api-routes)** — define the serverless functions in your app
-To read more about API routes, [see the API Routes section.](/solid-start/building-your-application/api-routes)
+To read more about API routes, [see the API Routes section.](/solid-start/v1/building-your-application/api-routes)
## Creating new routes
SolidStart uses file based routing which is a way of defining your routes by creating files and folders in your project.
This includes your pages and API routes.
-SolidStart traverses your `routes` directory, collects all of the routes, and then makes them accessible using the [``](/solid-start/reference/routing/file-routes).
+SolidStart traverses your `routes` directory, collects all of the routes, and then makes them accessible using the [``](/solid-start/v1/reference/routing/file-routes).
This component will only include your UI routes, not your API routes.
Rather than manually defining each `Route` inside a `Router` component, `` will generate the routes for you based on the file system.
diff --git a/src/routes/solid-start/(0)building-your-application/(1)api-routes.mdx b/src/routes/solid-start/v1/(0)building-your-application/(1)api-routes.mdx
similarity index 97%
rename from src/routes/solid-start/(0)building-your-application/(1)api-routes.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(1)api-routes.mdx
index 3ee6d14899..184d34b7a7 100644
--- a/src/routes/solid-start/(0)building-your-application/(1)api-routes.mdx
+++ b/src/routes/solid-start/v1/(0)building-your-application/(1)api-routes.mdx
@@ -27,7 +27,7 @@ Some reasons for wanting API Routes include:
- Having URLs not serving HTML, but other kinds of documents like PDFs or images.
For these use cases, SolidStart provides a way to write these routes in a way that is easy to understand and maintain.
-API routes are just similar to other routes and follow the same filename conventions as [UI Routes](/solid-start/building-your-application/routing).
+API routes are just similar to other routes and follow the same filename conventions as [UI Routes](/solid-start/v1/building-your-application/routing).
The difference between API routes and UI routes is in what you should export from the file.
UI routes export a default Solid component, while API Routes do not.
@@ -123,7 +123,7 @@ export async function GET(event: APIEvent) {
```
In this example, you can see that the `userId` is read from the cookie and then used to look up the user in the store.
-For more information on how to use cookies for secure session management, read the [session documentation](/solid-start/advanced/session).
+For more information on how to use cookies for secure session management, read the [session documentation](/solid-start/v1/advanced/session).
## Exposing a GraphQL API
diff --git a/src/routes/solid-start/(0)building-your-application/(2)css-and-styling.mdx b/src/routes/solid-start/v1/(0)building-your-application/(2)css-and-styling.mdx
similarity index 100%
rename from src/routes/solid-start/(0)building-your-application/(2)css-and-styling.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(2)css-and-styling.mdx
diff --git a/src/routes/solid-start/(0)building-your-application/(3)data-fetching.mdx b/src/routes/solid-start/v1/(0)building-your-application/(3)data-fetching.mdx
similarity index 97%
rename from src/routes/solid-start/(0)building-your-application/(3)data-fetching.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(3)data-fetching.mdx
index 5381062d2b..0f0e55589a 100644
--- a/src/routes/solid-start/(0)building-your-application/(3)data-fetching.mdx
+++ b/src/routes/solid-start/v1/(0)building-your-application/(3)data-fetching.mdx
@@ -10,7 +10,7 @@ SolidStart builds on these capabilities, extending them to provide a comprehensi
This page assumes you are familiar with the fundamental concepts of Solid and Solid Router.
If you are a beginner, we highly recommend starting with the [queries documentation](/solid-router/data-fetching/queries).
-You can also find many practical examples in the [data fetching how-to guide](/solid-start/guides/data-fetching).
+You can also find many practical examples in the [data fetching how-to guide](/solid-start/v1/guides/data-fetching).
## Server functions and queries
diff --git a/src/routes/solid-start/(0)building-your-application/(4)data-mutation.mdx b/src/routes/solid-start/v1/(0)building-your-application/(4)data-mutation.mdx
similarity index 98%
rename from src/routes/solid-start/(0)building-your-application/(4)data-mutation.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(4)data-mutation.mdx
index f1a0204a0e..d5174bc5f8 100644
--- a/src/routes/solid-start/(0)building-your-application/(4)data-mutation.mdx
+++ b/src/routes/solid-start/v1/(0)building-your-application/(4)data-mutation.mdx
@@ -10,7 +10,7 @@ SolidStart builds upon the capabilities of actions, extending their scope to pro
This page does not cover the foundational concepts from Solid Router.
If you are a beginner, we highly recommend starting with the [actions documentation](/solid-router/concepts/actions).
-You can also find many practical examples in the [data mutation how-to guide](/solid-start/guides/data-mutation).
+You can also find many practical examples in the [data mutation how-to guide](/solid-start/v1/guides/data-mutation).
## Server functions and actions
diff --git a/src/routes/solid-start/(0)building-your-application/(5)head-and-metadata.mdx b/src/routes/solid-start/v1/(0)building-your-application/(5)head-and-metadata.mdx
similarity index 100%
rename from src/routes/solid-start/(0)building-your-application/(5)head-and-metadata.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(5)head-and-metadata.mdx
diff --git a/src/routes/solid-start/(0)building-your-application/(6)route-prerendering.mdx b/src/routes/solid-start/v1/(0)building-your-application/(6)route-prerendering.mdx
similarity index 100%
rename from src/routes/solid-start/(0)building-your-application/(6)route-prerendering.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(6)route-prerendering.mdx
diff --git a/src/routes/solid-start/(0)building-your-application/(7)static-assets.mdx b/src/routes/solid-start/v1/(0)building-your-application/(7)static-assets.mdx
similarity index 100%
rename from src/routes/solid-start/(0)building-your-application/(7)static-assets.mdx
rename to src/routes/solid-start/v1/(0)building-your-application/(7)static-assets.mdx
diff --git a/src/routes/solid-start/(0)index.mdx b/src/routes/solid-start/v1/(0)index.mdx
similarity index 100%
rename from src/routes/solid-start/(0)index.mdx
rename to src/routes/solid-start/v1/(0)index.mdx
diff --git a/src/routes/solid-start/(1)advanced/(0)middleware.mdx b/src/routes/solid-start/v1/(1)advanced/(0)middleware.mdx
similarity index 98%
rename from src/routes/solid-start/(1)advanced/(0)middleware.mdx
rename to src/routes/solid-start/v1/(1)advanced/(0)middleware.mdx
index cca076be19..89ffc58fcc 100644
--- a/src/routes/solid-start/(1)advanced/(0)middleware.mdx
+++ b/src/routes/solid-start/v1/(1)advanced/(0)middleware.mdx
@@ -44,7 +44,7 @@ While middleware is powerful, certain tasks are better handled in other parts of
## Basic usage
Middleware is configured by exporting a configuration object from a dedicated file (e.g., `src/middleware/index.ts`).
-This object, created using the [`createMiddleware`](/solid-start/reference/server/create-middleware) function, defines when middleware functions execute throughout the request lifecycle.
+This object, created using the [`createMiddleware`](/solid-start/v1/reference/server/create-middleware) function, defines when middleware functions execute throughout the request lifecycle.
```ts title="src/middleware/index.ts"
import { createMiddleware } from "@solidjs/start/middleware";
diff --git a/src/routes/solid-start/(1)advanced/(1)session.mdx b/src/routes/solid-start/v1/(1)advanced/(1)session.mdx
similarity index 100%
rename from src/routes/solid-start/(1)advanced/(1)session.mdx
rename to src/routes/solid-start/v1/(1)advanced/(1)session.mdx
diff --git a/src/routes/solid-start/(1)advanced/(2)request-events.mdx b/src/routes/solid-start/v1/(1)advanced/(2)request-events.mdx
similarity index 100%
rename from src/routes/solid-start/(1)advanced/(2)request-events.mdx
rename to src/routes/solid-start/v1/(1)advanced/(2)request-events.mdx
diff --git a/src/routes/solid-start/(1)advanced/(3)return-responses.mdx b/src/routes/solid-start/v1/(1)advanced/(3)return-responses.mdx
similarity index 100%
rename from src/routes/solid-start/(1)advanced/(3)return-responses.mdx
rename to src/routes/solid-start/v1/(1)advanced/(3)return-responses.mdx
diff --git a/src/routes/solid-start/(1)advanced/(4)serialization.mdx b/src/routes/solid-start/v1/(1)advanced/(4)serialization.mdx
similarity index 90%
rename from src/routes/solid-start/(1)advanced/(4)serialization.mdx
rename to src/routes/solid-start/v1/(1)advanced/(4)serialization.mdx
index f896c92cca..bd76296539 100644
--- a/src/routes/solid-start/(1)advanced/(4)serialization.mdx
+++ b/src/routes/solid-start/v1/(1)advanced/(4)serialization.mdx
@@ -45,7 +45,7 @@ export default defineConfig({
});
```
-See the full config reference in [`defineConfig`](/solid-start/reference/config/define-config#serialization).
+See the full config reference in [`defineConfig`](/solid-start/v1/reference/config/define-config#serialization).
## Modes
@@ -74,5 +74,5 @@ Seroval supports additional value types. The compatibility list is broader than
## Related guidance
-- Configure modes and defaults in [`defineConfig`](/solid-start/reference/config/define-config#serialization).
-- CSP implications and nonce examples live in the [Security guide](/solid-start/guides/security#content-security-policy-csp).
+- Configure modes and defaults in [`defineConfig`](/solid-start/v1/reference/config/define-config#serialization).
+- CSP implications and nonce examples live in the [Security guide](/solid-start/v1/guides/security#content-security-policy-csp).
diff --git a/src/routes/solid-start/(1)advanced/(5)auth.mdx b/src/routes/solid-start/v1/(1)advanced/(5)auth.mdx
similarity index 98%
rename from src/routes/solid-start/(1)advanced/(5)auth.mdx
rename to src/routes/solid-start/v1/(1)advanced/(5)auth.mdx
index 7fa21c2fa7..b0d2f2eb68 100644
--- a/src/routes/solid-start/(1)advanced/(5)auth.mdx
+++ b/src/routes/solid-start/v1/(1)advanced/(5)auth.mdx
@@ -31,7 +31,7 @@ async function getPrivatePosts() {
}
```
-The `getUser` function can be [implemented using sessions](/solid-start/advanced/session).
+The `getUser` function can be [implemented using sessions](/solid-start/v1/advanced/session).
## Protected Routes
diff --git a/src/routes/solid-start/(1)advanced/(6)websocket.mdx b/src/routes/solid-start/v1/(1)advanced/(6)websocket.mdx
similarity index 100%
rename from src/routes/solid-start/(1)advanced/(6)websocket.mdx
rename to src/routes/solid-start/v1/(1)advanced/(6)websocket.mdx
diff --git a/src/routes/solid-start/(1)getting-started.mdx b/src/routes/solid-start/v1/(1)getting-started.mdx
similarity index 86%
rename from src/routes/solid-start/(1)getting-started.mdx
rename to src/routes/solid-start/v1/(1)getting-started.mdx
index ace5c46fd1..93c782a003 100644
--- a/src/routes/solid-start/(1)getting-started.mdx
+++ b/src/routes/solid-start/v1/(1)getting-started.mdx
@@ -109,9 +109,9 @@ Each directory and file in this structure serves a specific purpose in your Soli
- `src/` - where your Start application code will live.
It is aliased to `~/` for importing in your code.
- `src/routes/` - any files or pages will be located in this directory.
- You can learn more about the [`routes` folder in the routing section](/solid-start/building-your-application/routing).
-- [`src/entry-client.tsx`](/solid-start/reference/entrypoints/entry-client) - this file is what loads and _hydrates_ the JavaScript for our application on the client side (in browser).
+ You can learn more about the [`routes` folder in the routing section](/solid-start/v1/building-your-application/routing).
+- [`src/entry-client.tsx`](/solid-start/v1/reference/entrypoints/entry-client) - this file is what loads and _hydrates_ the JavaScript for our application on the client side (in browser).
In most cases, you will **not** need to modify this file.
-- [`src/entry-server.tsx`](/solid-start/reference/entrypoints/entry-server) - this file will handle requests on the server.
+- [`src/entry-server.tsx`](/solid-start/v1/reference/entrypoints/entry-server) - this file will handle requests on the server.
Like `entry-client.tsx`, in most cases you will **not** need to modify this file.
-- [`app.tsx`](/solid-start/reference/entrypoints/app) - this is the HTML root of your application both for client and server rendering. You can think of this as the shell inside which your application will be rendered.
+- [`app.tsx`](/solid-start/v1/reference/entrypoints/app) - this is the HTML root of your application both for client and server rendering. You can think of this as the shell inside which your application will be rendered.
diff --git a/src/routes/solid-start/(2)guides/(0)security.mdx b/src/routes/solid-start/v1/(2)guides/(0)security.mdx
similarity index 93%
rename from src/routes/solid-start/(2)guides/(0)security.mdx
rename to src/routes/solid-start/v1/(2)guides/(0)security.mdx
index ee55557bfa..46ae9f1a29 100644
--- a/src/routes/solid-start/(2)guides/(0)security.mdx
+++ b/src/routes/solid-start/v1/(2)guides/(0)security.mdx
@@ -36,19 +36,19 @@ It is highly recommended to read the [Cross Site Scripting Prevention Cheat Shee
## Content Security Policy (CSP)
-To configure the `Content-Security-Policy` HTTP header, a [middleware](/solid-start/advanced/middleware) can be used.
+To configure the `Content-Security-Policy` HTTP header, a [middleware](/solid-start/v1/advanced/middleware) can be used.
-If you enforce a strict CSP, configure SolidStart to use JSON serialization mode to avoid `unsafe-eval` requirements. See [defineConfig serialization](/solid-start/reference/config/define-config#serialization). Note that `unsafe-eval` is only required for `serialization.mode: "js"`.
+If you enforce a strict CSP, configure SolidStart to use JSON serialization mode to avoid `unsafe-eval` requirements. See [defineConfig serialization](/solid-start/v1/reference/config/define-config#serialization). Note that `unsafe-eval` is only required for `serialization.mode: "js"`.
### With nonce (recommended)
If you want to use a [strict CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#strict_csp) with nonces:
1. Create a middleware that configures the CSP header.
- It must then be registered using the [`onRequest`](/solid-start/advanced/middleware#onrequest) event.
+ It must then be registered using the [`onRequest`](/solid-start/v1/advanced/middleware#onrequest) event.
2. Create a nonce using a cryptographic random value generator, such as the [`randomBytes`](https://nodejs.org/api/crypto.html#cryptorandombytessize-callback) function from the `crypto` module.
-3. Store the nonce in the [`locals`](/solid-start/advanced/middleware#locals) object.
-4. Configure SolidStart to use the nonce in your [`entry-server.tsx`](/solid-start/reference/entrypoints/entry-server) file.
+3. Store the nonce in the [`locals`](/solid-start/v1/advanced/middleware#locals) object.
+4. Configure SolidStart to use the nonce in your [`entry-server.tsx`](/solid-start/v1/reference/entrypoints/entry-server) file.
```tsx tab title="Middleware"
import { createMiddleware } from "@solidjs/start/middleware";
@@ -87,7 +87,7 @@ export default createHandler(
### Without nonce
-To configure CSP without a nonce, a middleware that sets the CSP header is required, and it should be registered to run during the [`onBeforeResponse`](/solid-start/advanced/middleware#onbeforeresponse) event:
+To configure CSP without a nonce, a middleware that sets the CSP header is required, and it should be registered to run during the [`onBeforeResponse`](/solid-start/v1/advanced/middleware#onbeforeresponse) event:
```tsx
import { createMiddleware } from "@solidjs/start/middleware";
diff --git a/src/routes/solid-start/(2)guides/(1)data-fetching.mdx b/src/routes/solid-start/v1/(2)guides/(1)data-fetching.mdx
similarity index 99%
rename from src/routes/solid-start/(2)guides/(1)data-fetching.mdx
rename to src/routes/solid-start/v1/(2)guides/(1)data-fetching.mdx
index 859a1f6bb4..dc6fb1fa38 100644
--- a/src/routes/solid-start/(2)guides/(1)data-fetching.mdx
+++ b/src/routes/solid-start/v1/(2)guides/(1)data-fetching.mdx
@@ -287,7 +287,7 @@ export default function Page() {
## Using a database or an ORM
-To safely interact with your database or ORM in a query, use a [server function](/solid-start/reference/server/use-server):
+To safely interact with your database or ORM in a query, use a [server function](/solid-start/v1/reference/server/use-server):
```tsx tab title="TypeScript" {7-8}
// src/routes/index.tsx
diff --git a/src/routes/solid-start/(2)guides/(2)data-mutation.mdx b/src/routes/solid-start/v1/(2)guides/(2)data-mutation.mdx
similarity index 99%
rename from src/routes/solid-start/(2)guides/(2)data-mutation.mdx
rename to src/routes/solid-start/v1/(2)guides/(2)data-mutation.mdx
index 6d0d21eff8..5a9406e27b 100644
--- a/src/routes/solid-start/(2)guides/(2)data-mutation.mdx
+++ b/src/routes/solid-start/v1/(2)guides/(2)data-mutation.mdx
@@ -457,7 +457,7 @@ export default function Page() {
## Using a database or an ORM
-To safely interact with your database or ORM in an action, ensure it's server-only by adding [`"use server"`](/solid-start/reference/server/use-server) as the first line of your action:
+To safely interact with your database or ORM in an action, ensure it's server-only by adding [`"use server"`](/solid-start/v1/reference/server/use-server) as the first line of your action:
```tsx tab title="TypeScript" {6}
// src/routes/index.tsx
diff --git a/src/routes/solid-start/(2)guides/(3)service-workers.mdx b/src/routes/solid-start/v1/(2)guides/(3)service-workers.mdx
similarity index 100%
rename from src/routes/solid-start/(2)guides/(3)service-workers.mdx
rename to src/routes/solid-start/v1/(2)guides/(3)service-workers.mdx
diff --git a/src/routes/solid-start/(2)guides/(4)background-tasks.mdx b/src/routes/solid-start/v1/(2)guides/(4)background-tasks.mdx
similarity index 100%
rename from src/routes/solid-start/(2)guides/(4)background-tasks.mdx
rename to src/routes/solid-start/v1/(2)guides/(4)background-tasks.mdx
diff --git a/src/routes/solid-start/reference/client/client-only.mdx b/src/routes/solid-start/v1/reference/client/client-only.mdx
similarity index 100%
rename from src/routes/solid-start/reference/client/client-only.mdx
rename to src/routes/solid-start/v1/reference/client/client-only.mdx
diff --git a/src/routes/solid-start/reference/client/mount.mdx b/src/routes/solid-start/v1/reference/client/mount.mdx
similarity index 95%
rename from src/routes/solid-start/reference/client/mount.mdx
rename to src/routes/solid-start/v1/reference/client/mount.mdx
index e78828bd36..a42320afec 100644
--- a/src/routes/solid-start/reference/client/mount.mdx
+++ b/src/routes/solid-start/v1/reference/client/mount.mdx
@@ -70,4 +70,4 @@ mount(() => , document.getElementById("app")!);
## Related
- [`hydrate`](/reference/rendering/hydrate)
-- [`StartClient`](/solid-start/reference/client/start-client)
+- [`StartClient`](/solid-start/v1/reference/client/start-client)
diff --git a/src/routes/solid-start/reference/client/start-client.mdx b/src/routes/solid-start/v1/reference/client/start-client.mdx
similarity index 94%
rename from src/routes/solid-start/reference/client/start-client.mdx
rename to src/routes/solid-start/v1/reference/client/start-client.mdx
index 03bf4138bf..3d7c81e63d 100644
--- a/src/routes/solid-start/reference/client/start-client.mdx
+++ b/src/routes/solid-start/v1/reference/client/start-client.mdx
@@ -52,4 +52,4 @@ mount(() => , document.getElementById("app")!);
## Related
-- [`mount`](/solid-start/reference/client/mount)
+- [`mount`](/solid-start/v1/reference/client/mount)
diff --git a/src/routes/solid-start/reference/config/define-config.mdx b/src/routes/solid-start/v1/reference/config/define-config.mdx
similarity index 97%
rename from src/routes/solid-start/reference/config/define-config.mdx
rename to src/routes/solid-start/v1/reference/config/define-config.mdx
index d8c7d637f7..ff80439e46 100644
--- a/src/routes/solid-start/reference/config/define-config.mdx
+++ b/src/routes/solid-start/v1/reference/config/define-config.mdx
@@ -16,7 +16,7 @@ description: >-
presets, and deployment targets for any platform.
---
-The `defineConfig` helper is from `@solidjs/start/config` and is used within [`app.config.ts`](/solid-start/reference/entrypoints/app-config).
+The `defineConfig` helper is from `@solidjs/start/config` and is used within [`app.config.ts`](/solid-start/v1/reference/entrypoints/app-config).
It takes a configuration object with settings for SolidStart, Vite, and Nitro.
@@ -116,7 +116,7 @@ Some common ones include:
**Static site generation**
-- [Route pre-rendering](/solid-start/building-your-application/route-prerendering)
+- [Route pre-rendering](/solid-start/v1/building-your-application/route-prerendering)
By passing no arguments, the default will be the Node preset.
Other presets may be automatically detected by the provider, however, if not, they must be added to the configuration within the `server-preset` option.
@@ -168,7 +168,7 @@ compatibility_flags = [ "nodejs_compat" ]
| serialization | object | | Serialization settings for server function payloads. |
| appRoot | string | "./src" | The path to the root of the application. |
| routeDir | string | "./routes" | The path to where the routes are located. |
-| middleware | string | | The path to an optional [middleware](/solid-start/advanced/middleware) file. |
+| middleware | string | | The path to an optional [middleware](/solid-start/v1/advanced/middleware) file. |
| devOverlay | boolean | true | Toggle the dev overlay. |
| experimental.islands | boolean | false | Enable "islands" mode. |
| vite | `ViteConfig` or `({ router })=>ViteConfig` | | [Vite config object](https://vitejs.dev/config/shared-options.html). Can be configured for each `router` which has the string value "server", "client" or "server-function"` |
diff --git a/src/routes/solid-start/reference/entrypoints/(0)app-config.mdx b/src/routes/solid-start/v1/reference/entrypoints/(0)app-config.mdx
similarity index 83%
rename from src/routes/solid-start/reference/entrypoints/(0)app-config.mdx
rename to src/routes/solid-start/v1/reference/entrypoints/(0)app-config.mdx
index 30087ce271..359652927e 100644
--- a/src/routes/solid-start/reference/entrypoints/(0)app-config.mdx
+++ b/src/routes/solid-start/v1/reference/entrypoints/(0)app-config.mdx
@@ -26,11 +26,11 @@ export default defineConfig(baseConfig);
## Parameters
-`app.config.ts` passes its configuration object to [`defineConfig`](/solid-start/reference/config/define-config).
+`app.config.ts` passes its configuration object to [`defineConfig`](/solid-start/v1/reference/config/define-config).
## Return value
-The default export is the value returned by [`defineConfig`](/solid-start/reference/config/define-config).
+The default export is the value returned by [`defineConfig`](/solid-start/v1/reference/config/define-config).
## Behavior
@@ -49,4 +49,4 @@ export default defineConfig({});
## Related
-- [`defineConfig`](/solid-start/reference/config/define-config)
+- [`defineConfig`](/solid-start/v1/reference/config/define-config)
diff --git a/src/routes/solid-start/reference/entrypoints/app.mdx b/src/routes/solid-start/v1/reference/entrypoints/app.mdx
similarity index 93%
rename from src/routes/solid-start/reference/entrypoints/app.mdx
rename to src/routes/solid-start/v1/reference/entrypoints/app.mdx
index 7a742ee755..c3a201c082 100644
--- a/src/routes/solid-start/reference/entrypoints/app.mdx
+++ b/src/routes/solid-start/v1/reference/entrypoints/app.mdx
@@ -58,4 +58,4 @@ export default function App() {
## Related
-- [`FileRoutes`](/solid-start/reference/routing/file-routes)
+- [`FileRoutes`](/solid-start/v1/reference/routing/file-routes)
diff --git a/src/routes/solid-start/reference/entrypoints/entry-client.mdx b/src/routes/solid-start/v1/reference/entrypoints/entry-client.mdx
similarity index 84%
rename from src/routes/solid-start/reference/entrypoints/entry-client.mdx
rename to src/routes/solid-start/v1/reference/entrypoints/entry-client.mdx
index 6ca01afbd9..a1b01e868b 100644
--- a/src/routes/solid-start/reference/entrypoints/entry-client.mdx
+++ b/src/routes/solid-start/v1/reference/entrypoints/entry-client.mdx
@@ -27,7 +27,7 @@ mount(() => , element);
## Parameters
-`entry-client.tsx` passes a `StartClient` render function and DOM element to [`mount`](/solid-start/reference/client/mount).
+`entry-client.tsx` passes a `StartClient` render function and DOM element to [`mount`](/solid-start/v1/reference/client/mount).
## Return value
@@ -51,5 +51,5 @@ mount(() => , document.getElementById("app")!);
## Related
-- [`mount`](/solid-start/reference/client/mount)
-- [`StartClient`](/solid-start/reference/client/start-client)
+- [`mount`](/solid-start/v1/reference/client/mount)
+- [`StartClient`](/solid-start/v1/reference/client/start-client)
diff --git a/src/routes/solid-start/reference/entrypoints/entry-server.mdx b/src/routes/solid-start/v1/reference/entrypoints/entry-server.mdx
similarity index 83%
rename from src/routes/solid-start/reference/entrypoints/entry-server.mdx
rename to src/routes/solid-start/v1/reference/entrypoints/entry-server.mdx
index ad3a70048e..49eb607f74 100644
--- a/src/routes/solid-start/reference/entrypoints/entry-server.mdx
+++ b/src/routes/solid-start/v1/reference/entrypoints/entry-server.mdx
@@ -31,14 +31,14 @@ The handler callback receives a `PageEvent`.
## Return value
-The default export is the event handler returned by [`createHandler`](/solid-start/reference/server/create-handler).
+The default export is the event handler returned by [`createHandler`](/solid-start/v1/reference/server/create-handler).
## Behavior
- `defineConfig` uses `${appRoot}/entry-server${entryExtension}` as the server handler.
- The default `appRoot` is `"./src"`.
- Entry extension is `.jsx` when `${appRoot}/app.jsx` exists; otherwise it is `.tsx`.
-- For setting different SSR modes (sync | async | stream), see [`createHandler`](/solid-start/reference/server/create-handler).
+- For setting different SSR modes (sync | async | stream), see [`createHandler`](/solid-start/v1/reference/server/create-handler).
## Examples
@@ -64,5 +64,5 @@ export default createHandler((event) => );
## Related
-- [`createHandler`](/solid-start/reference/server/create-handler)
-- [`StartServer`](/solid-start/reference/server/start-server)
+- [`createHandler`](/solid-start/v1/reference/server/create-handler)
+- [`StartServer`](/solid-start/v1/reference/server/start-server)
diff --git a/src/routes/solid-start/reference/routing/file-routes.mdx b/src/routes/solid-start/v1/reference/routing/file-routes.mdx
similarity index 100%
rename from src/routes/solid-start/reference/routing/file-routes.mdx
rename to src/routes/solid-start/v1/reference/routing/file-routes.mdx
diff --git a/src/routes/solid-start/reference/server/create-handler.mdx b/src/routes/solid-start/v1/reference/server/create-handler.mdx
similarity index 98%
rename from src/routes/solid-start/reference/server/create-handler.mdx
rename to src/routes/solid-start/v1/reference/server/create-handler.mdx
index e315f963b2..33bc0c85ef 100644
--- a/src/routes/solid-start/reference/server/create-handler.mdx
+++ b/src/routes/solid-start/v1/reference/server/create-handler.mdx
@@ -102,4 +102,4 @@ export default createHandler((event) => );
## Related
-- [`StartServer`](/solid-start/reference/server/start-server)
+- [`StartServer`](/solid-start/v1/reference/server/start-server)
diff --git a/src/routes/solid-start/reference/server/create-middleware.mdx b/src/routes/solid-start/v1/reference/server/create-middleware.mdx
similarity index 100%
rename from src/routes/solid-start/reference/server/create-middleware.mdx
rename to src/routes/solid-start/v1/reference/server/create-middleware.mdx
diff --git a/src/routes/solid-start/reference/server/get-server-function-meta.mdx b/src/routes/solid-start/v1/reference/server/get-server-function-meta.mdx
similarity index 100%
rename from src/routes/solid-start/reference/server/get-server-function-meta.mdx
rename to src/routes/solid-start/v1/reference/server/get-server-function-meta.mdx
diff --git a/src/routes/solid-start/reference/server/get.mdx b/src/routes/solid-start/v1/reference/server/get.mdx
similarity index 100%
rename from src/routes/solid-start/reference/server/get.mdx
rename to src/routes/solid-start/v1/reference/server/get.mdx
diff --git a/src/routes/solid-start/reference/server/http-header.mdx b/src/routes/solid-start/v1/reference/server/http-header.mdx
similarity index 100%
rename from src/routes/solid-start/reference/server/http-header.mdx
rename to src/routes/solid-start/v1/reference/server/http-header.mdx
diff --git a/src/routes/solid-start/reference/server/http-status-code.mdx b/src/routes/solid-start/v1/reference/server/http-status-code.mdx
similarity index 100%
rename from src/routes/solid-start/reference/server/http-status-code.mdx
rename to src/routes/solid-start/v1/reference/server/http-status-code.mdx
diff --git a/src/routes/solid-start/reference/server/start-server.mdx b/src/routes/solid-start/v1/reference/server/start-server.mdx
similarity index 95%
rename from src/routes/solid-start/reference/server/start-server.mdx
rename to src/routes/solid-start/v1/reference/server/start-server.mdx
index 9df321c06b..cda3b87a1f 100644
--- a/src/routes/solid-start/reference/server/start-server.mdx
+++ b/src/routes/solid-start/v1/reference/server/start-server.mdx
@@ -74,4 +74,4 @@ export default createHandler((event) => );
## Related
-- [`createHandler`](/solid-start/reference/server/create-handler)
+- [`createHandler`](/solid-start/v1/reference/server/create-handler)
diff --git a/src/routes/solid-start/reference/server/use-server.mdx b/src/routes/solid-start/v1/reference/server/use-server.mdx
similarity index 93%
rename from src/routes/solid-start/reference/server/use-server.mdx
rename to src/routes/solid-start/v1/reference/server/use-server.mdx
index aaea56716f..e128ec4cf0 100644
--- a/src/routes/solid-start/reference/server/use-server.mdx
+++ b/src/routes/solid-start/v1/reference/server/use-server.mdx
@@ -61,4 +61,4 @@ export async function logMessage(message: string) {
## Related
-- [`getServerFunctionMeta`](/solid-start/reference/server/get-server-function-meta)
+- [`getServerFunctionMeta`](/solid-start/v1/reference/server/get-server-function-meta)
diff --git a/src/routes/v2/(0)index.mdx b/src/routes/v2/(0)index.mdx
index ca64a1905f..69abb97b88 100644
--- a/src/routes/v2/(0)index.mdx
+++ b/src/routes/v2/(0)index.mdx
@@ -25,6 +25,6 @@ If you're seeking a more stable experience, please refer to the [Solid v1 docume
:::
Solid is a framework for building user interfaces (UIs) on the web.
-You can use it to create anything from small personal projects to complex full-stack applications (with Solid's full-stack framework, [SolidStart](/solid-start)), and everything in between.
+You can use it to create anything from small personal projects to complex full-stack applications (with Solid's full-stack framework, [SolidStart](/solid-start/v2)), and everything in between.
You can try Solid online in the [playground](https://playground.solidjs.com/) or [start a project](/v2/getting-started) right away!
diff --git a/src/routes/v2/(1)getting-started.mdx b/src/routes/v2/(1)getting-started.mdx
index 425766cf3c..655fa5e658 100644
--- a/src/routes/v2/(1)getting-started.mdx
+++ b/src/routes/v2/(1)getting-started.mdx
@@ -20,7 +20,7 @@ By default, the setup uses SolidStart, which is Solid's full-stack framework.
While we strongly recommend using Solid with SolidStart, you can also use Solid directly with [Vite](https://vite.dev/) by selecting the `SolidJS + Vite` option in the Solid CLI.
:::note
-Vite is commonly used for building [single-page applications (SPAs)](https://en.wikipedia.org/wiki/Single-page_application), which you can also build with [SolidStart](/solid-start).
+Vite is commonly used for building [single-page applications (SPAs)](https://en.wikipedia.org/wiki/Single-page_application), which you can also build with [SolidStart](/solid-start/v2).
:::
## Getting help
diff --git a/vite.config.ts b/vite.config.ts
index dc03bf5f6c..a810bb5342 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -61,8 +61,8 @@ export default defineConfig({
default: "latest",
values: {
latest: { path: "", label: "Latest" },
- v1: { path: "v1", label: "v1" },
v2: { path: "v2", label: "v2" },
+ v1: { path: "v1", label: "v1" },
},
},
include: [
@@ -72,7 +72,7 @@ export default defineConfig({
},
{
project: "start",
- version: ["latest", "v2"],
+ version: ["v2", "v1"],
},
{
project: "router",
@@ -85,6 +85,14 @@ export default defineConfig({
],
},
overrides: [
+ {
+ project: "start",
+ route: {
+ version: {
+ v1: { label: "v1 (legacy)" },
+ },
+ },
+ },
{
project: "router",
title: "Solid Router",
@@ -98,14 +106,12 @@ export default defineConfig({
},
{
project: "start",
+ version: "v1",
title: "SolidStart",
themeConfig: {
sidebar: {
- "/solid-start": createFilesystemSidebar(
- "./src/routes/solid-start",
- {
- filter: (item) => !item.filePath.includes("/solid-start/v2"),
- }
+ "/solid-start/v1": createFilesystemSidebar(
+ "./src/routes/solid-start/v1"
),
},
},
@@ -257,7 +263,9 @@ export default defineConfig({
],
},
}),
- solidStart(solidBase.startConfig()),
+ solidStart(
+ solidBase.startConfig({ middleware: "./src/middleware/index.ts" })
+ ),
nitro({
preset: "netlify",
prerender: {
@@ -265,7 +273,7 @@ export default defineConfig({
autoSubfolderIndex: false,
// failOnError: true,
// eslint-disable-next-line no-useless-escape
- ignore: [/\{\getPath}/, /.*?emojiSvg\(.*/],
+ ignore: [/^\/solid-start$/, /\{\getPath}/, /.*?emojiSvg\(.*/],
},
}),
],