Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osmium/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function useProject() {
current: useSolidBaseRoute()().project ?? "solid",
projects: ("values" in projectConfig
? projectConfig.values
: { solid: { path: "", label: "Solid" } }) as Record<
: { solid: { path: "", label: "Solid2" } }) as Record<
string,
{ path: string; label: string }
>,
Expand Down
83 changes: 83 additions & 0 deletions public/images/logos/solid2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 138 additions & 0 deletions src/routes/(3)building-apps/(7)deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,141 @@ The pinned Solid 2.0 sources define the `handleRequest(Request) -> Promise<Respo
They do not include a verified catalog of provider-specific deployment adapters.
Treat provider adapters and `start.external` integrations as integration-specific until their packages test this exact handler contract and Solid 2.0 version.
:::

### Integration examples

#### Nitro

[Nitro v3](https://nitro.build/) supports multiple deployment targets through presets.

```package-install
nitro
```

Add `nitro()` and configure the `ssr` environment:

```tsx title="vite.config.ts"
import { nitro } from "nitro/vite";
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";

export default defineConfig({
plugins: [
solid({ start: { external: true }, ssr: true }),
nitro({ serverEntry: false }),
],
environments: {
ssr: {
build: {
rollupOptions: {
input: "./src/ssr.ts",
},
},
},
},
});
```

Then add `src/ssr.ts`:

```ts
import { handleRequest } from "virtual:solid-ssr-handler";

export default {
fetch(request: Request) {
return handleRequest(request);
},
};
```

Use the top-level `nitro` property for deployment presets, prerendering, tasks, WebSockets, and other Nitro options. See the [Nitro configuration reference](https://nitro.build/config).

#### Netlify

The Netlify Vite plugin prepares the server build for Netlify Functions and emulates Netlify platform features during development.

```package-install-dev
@netlify/vite-plugin
```

Add the plugin after `solid()` and enable its build support:

```tsx title="vite.config.ts"
import netlify from "@netlify/vite-plugin";
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";

export default defineConfig({
plugins: [
solid({ start: { external: true }, ssr: true }),
netlify({ build: { enabled: true } }),
],
});
```

No Solid-specific adapter is required. Netlify detects Solid and can supply the build command and publish directory automatically.

#### Cloudflare

The [Cloudflare Vite plugin](https://developers.cloudflare.com/workers/vite-plugin/) runs the server build in the Workers runtime during development and prepares it for deployment to Cloudflare.

```package-install-dev
@cloudflare/vite-plugin wrangler
```

Map the Worker to Solid's `ssr` environment:

```tsx title="vite.config.ts"
import { cloudflare } from "@cloudflare/vite-plugin";
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";

export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: "ssr" } }),
solid({ start: { external: true }, ssr: true }),
],
environments: {
ssr: {
build: {
rollupOptions: {
input: "./src/ssr.ts",
},
},
},
},
});
```

Then add `src/ssr.ts`:

```ts
import { handleRequest } from "virtual:solid-ssr-handler";

export default {
fetch(request: Request) {
return handleRequest(request);
},
};
```

Then configure the Worker in `wrangler.jsonc`:

```jsonc
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "solid-2",
"main": "./src/ssr.ts",
"compatibility_date": "2026-07-22",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": "./dist/client",
"binding": "ASSETS",
},
"observability": {
"enabled": true,
},
}
```

The `viteEnvironment` option merges the Workers runtime configuration with Solid's server environment. Follow the Cloudflare guide to add a Wrangler configuration and any platform bindings.
Loading