From 6c8b01632c065b75df97959928f61e302e8205a4 Mon Sep 17 00:00:00 2001 From: Tymon Marek Date: Sat, 25 Jul 2026 10:25:25 +0100 Subject: [PATCH 1/4] fix(types): add missing options to SolidStartOptions Expose the appRoot configuration option in the SolidStartOptions interface to match the runtime implementation. Also add missing devOverlay and experimental options that are supported by the plugin defaults. --- packages/start/src/config/index.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts index 9b766bf0a..d6e9d8076 100644 --- a/packages/start/src/config/index.ts +++ b/packages/start/src/config/index.ts @@ -16,8 +16,13 @@ import { manifest } from "./manifest.ts"; import { parseIdQuery } from "./utils.ts"; export interface SolidStartOptions { + appRoot: string; solid?: Partial; ssr?: boolean; + devOverlay: boolean; + experimental: { + islands: false; + }; routeDir?: string; extensions?: string[]; middleware?: string; @@ -50,7 +55,7 @@ export function solidStart(options?: SolidStartOptions): Array { }, solid: {}, extensions: [], - }); + } satisfies SolidStartOptions); const extensions = [...DEFAULT_EXTENSIONS, ...(start.extensions || [])]; const routeDir = join(start.appRoot, start.routeDir); const root = process.cwd(); @@ -224,15 +229,9 @@ export function solidStart(options?: SolidStartOptions): Array { enforce: "pre", resolveId(id, importer, { ssr }) { if (id === "server-only") { - if (!ssr) - this.error( - `Attempt to import 'server-only' in a client module: ${importer}`, - ); + if (!ssr) this.error(`Attempt to import 'server-only' in a client module: ${importer}`); } else if (id === "client-only") { - if (ssr) - this.error( - `Attempt to import 'client-only' in a server module: ${importer}`, - ); + if (ssr) this.error(`Attempt to import 'client-only' in a server module: ${importer}`); } else { return null; } From e4ca45bbc5d620d3f5ae12f33f2284bcf9432344 Mon Sep 17 00:00:00 2001 From: Tymon Marek Date: Sat, 25 Jul 2026 10:49:04 +0100 Subject: [PATCH 2/4] docs: add docs for the SolidStartOptions interface --- packages/start/src/config/index.ts | 86 ++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts index d6e9d8076..12e5a499a 100644 --- a/packages/start/src/config/index.ts +++ b/packages/start/src/config/index.ts @@ -15,29 +15,109 @@ import lazy from "./lazy.ts"; import { manifest } from "./manifest.ts"; import { parseIdQuery } from "./utils.ts"; +/** + * Configuration options for SolidStart. (previously in `app.config.ts`) + * + * @see https://docs.solidjs.com/solid-start/v2/migrating-from-v1#move-framework-configuration-into-viteconfigts + */ export interface SolidStartOptions { + /** + * Path to the root of the application (where `app.tsx` / `app.jsx` lives). + * + * @default "./src" + */ appRoot: string; + + /** + * Options forwarded to `vite-plugin-solid`. + * + * @see https://github.com/solidjs/vite-plugin-solid#api + */ solid?: Partial; + + /** + * Enable or disable server-side rendering. + * + * - `true` — SSR (default) + * - `false` — client-side rendering only (SPA mode) + * + * @default true + */ ssr?: boolean; + + /** + * Show the SolidStart development overlay (error overlay, etc.) in development. + * + * @default true + */ devOverlay: boolean; + + /** + * Experimental features. + */ experimental: { + /** + * Enable islands architecture mode. + * + * Currently fixed to `false` (not yet fully supported). + * + * @default false + */ islands: false; }; + + /** + * Directory containing file-system routes, relative to {@link appRoot}. + * + * @default "./routes" + */ routeDir?: string; + + /** + * File extensions that should be treated as routes. + * + * @default ["js", "jsx", "ts", "tsx"] + */ extensions?: string[]; + + /** + * Path to an optional middleware module. + * + * The module should export a middleware created with `createMiddleware` + * from `@solidjs/start/middleware`. + * + * @example "src/middleware/index.ts" + */ middleware?: string; + + /** + * Serialization settings for server-function / action payloads + * that cross the server-client boundary. + */ serialization?: { /** * The serialization mode to use for server functions/actions. - * The "js" mode uses a custom binary format that is more efficient than JSON, but requires a custom deserializer (with `eval()`) on the client. - * A strong CSP should block `eval()` executions, which would prevent the "js" mode from working. - * The "json" mode uses JSON for serialization, which is less efficient but can be deserialized with `JSON.parse` on the client. + * + * - `"js"` — Uses a custom binary format (Seroval) that is more efficient + * than JSON, but requires a custom deserializer (with `eval()`) on the client. + * A strong CSP that blocks `eval()` will prevent this mode from working. + * - `"json"` — Uses JSON for serialization. Less efficient / larger payloads, + * but can be deserialized with `JSON.parse` on the client and is CSP-friendly. * * @default "json" */ mode?: "js" | "json"; }; + + /** + * Configures plugin behavior per build environment + */ env?: EnvPluginOptions; + + /** + * Options controlling which files are processed as server functions + * (inclusion / exclusion filters for the `"use server"` transform). + */ serverFunctions?: Pick; } From 7a5f033a206768c59aca1bca62228fb7c37ee3cb Mon Sep 17 00:00:00 2001 From: Tymon Marek Date: Sat, 25 Jul 2026 11:43:57 +0100 Subject: [PATCH 3/4] chore(release): add changeset for fix Added missing properties to `SolidStartOptions` and exposed them through Vite plugin configuration. --- .changeset/eleven-actors-nail.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eleven-actors-nail.md diff --git a/.changeset/eleven-actors-nail.md b/.changeset/eleven-actors-nail.md new file mode 100644 index 000000000..8e941eb4a --- /dev/null +++ b/.changeset/eleven-actors-nail.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +fix(types): add missing properties to `SolidStartOptions` and expose them via Vite plugin configuration From e96fcfddf6e4849f6c7e988182b969b696ed7b7a Mon Sep 17 00:00:00 2001 From: Tymon Marek Date: Sat, 25 Jul 2026 11:50:28 +0100 Subject: [PATCH 4/4] fix(types): make all configuration properties optional --- packages/start/src/config/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts index 12e5a499a..4ec6ab107 100644 --- a/packages/start/src/config/index.ts +++ b/packages/start/src/config/index.ts @@ -26,7 +26,7 @@ export interface SolidStartOptions { * * @default "./src" */ - appRoot: string; + appRoot?: string; /** * Options forwarded to `vite-plugin-solid`. @@ -50,12 +50,12 @@ export interface SolidStartOptions { * * @default true */ - devOverlay: boolean; + devOverlay?: boolean; /** * Experimental features. */ - experimental: { + experimental?: { /** * Enable islands architecture mode. * @@ -63,7 +63,7 @@ export interface SolidStartOptions { * * @default false */ - islands: false; + islands?: false; }; /**