From d59455e2439f3218c1f1dc3df7e426aebb953ef3 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 20:39:34 +0800 Subject: [PATCH 1/8] add vite/client to all fixtures tsconfig.json --- apps/fixtures/bare/tsconfig.json | 7 ++++--- apps/fixtures/basic/tsconfig.json | 7 ++++--- apps/fixtures/hackernews/tsconfig.json | 7 ++++--- apps/fixtures/nitro-3/tsconfig.json | 7 ++++--- apps/fixtures/notes/tsconfig.json | 7 ++++--- apps/fixtures/todomvc/tsconfig.json | 7 ++++--- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/apps/fixtures/bare/tsconfig.json b/apps/fixtures/bare/tsconfig.json index 4ea27f698..28dd3c6d3 100644 --- a/apps/fixtures/bare/tsconfig.json +++ b/apps/fixtures/bare/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/basic/tsconfig.json b/apps/fixtures/basic/tsconfig.json index 4ea27f698..28dd3c6d3 100644 --- a/apps/fixtures/basic/tsconfig.json +++ b/apps/fixtures/basic/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/hackernews/tsconfig.json b/apps/fixtures/hackernews/tsconfig.json index 4ea27f698..28dd3c6d3 100644 --- a/apps/fixtures/hackernews/tsconfig.json +++ b/apps/fixtures/hackernews/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/nitro-3/tsconfig.json b/apps/fixtures/nitro-3/tsconfig.json index 26b08446a..dd9b7514e 100644 --- a/apps/fixtures/nitro-3/tsconfig.json +++ b/apps/fixtures/nitro-3/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/notes/tsconfig.json b/apps/fixtures/notes/tsconfig.json index 4ea27f698..28dd3c6d3 100644 --- a/apps/fixtures/notes/tsconfig.json +++ b/apps/fixtures/notes/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/todomvc/tsconfig.json b/apps/fixtures/todomvc/tsconfig.json index 4ea27f698..28dd3c6d3 100644 --- a/apps/fixtures/todomvc/tsconfig.json +++ b/apps/fixtures/todomvc/tsconfig.json @@ -11,8 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, + "types": ["vite/client"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } From 194ae73cc0727678c5065a63cc2d3bb460a74895 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 20:57:21 +0800 Subject: [PATCH 2/8] separate internal and external global types + cleanup envs --- packages/start/env.d.ts | 7 ++ packages/start/package.json | 12 +++- packages/start/src/client/mount.ts | 106 +---------------------------- packages/start/src/config/index.ts | 3 - packages/start/src/env.d.ts | 22 +----- packages/start/tsconfig.json | 4 +- 6 files changed, 23 insertions(+), 131 deletions(-) create mode 100644 packages/start/env.d.ts diff --git a/packages/start/env.d.ts b/packages/start/env.d.ts new file mode 100644 index 000000000..526657708 --- /dev/null +++ b/packages/start/env.d.ts @@ -0,0 +1,7 @@ +// This file contains global type definitions that are exported as @solidjs/start/env + +declare namespace App { + export interface RequestEventLocals { + [key: string | symbol]: any; + } +} diff --git a/packages/start/package.json b/packages/start/package.json index 82caf790e..2f3406744 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -18,7 +18,11 @@ "./server/spa": "./src/server/spa/index.tsx", "./client/spa": "./src/client/spa/index.tsx", "./middleware": "./src/middleware/index.ts", - "./http": "./src/http/index.ts" + "./http": "./src/http/index.ts", + "./env": { + "types": "./env.d.ts", + "import": null + } }, "publishConfig": { "access": "public", @@ -31,7 +35,11 @@ "./server/spa": "./dist/server/spa/index.jsx", "./client/spa": "./dist/client/spa/index.jsx", "./middleware": "./dist/middleware/index.js", - "./http": "./dist/http/index.js" + "./http": "./dist/http/index.js", + "./env": { + "types": "./env.d.ts", + "import": null + } } }, "dependencies": { diff --git a/packages/start/src/client/mount.ts b/packages/start/src/client/mount.ts index 744e759a9..a1e90c06a 100644 --- a/packages/start/src/client/mount.ts +++ b/packages/start/src/client/mount.ts @@ -1,114 +1,10 @@ import type { JSX } from "solid-js"; -import { createStore } from "solid-js/store"; -import { - createComponent, - getHydrationKey, - getOwner, - hydrate, - type MountableElement, -} from "solid-js/web"; +import { hydrate, type MountableElement } from "solid-js/web"; /** * * Read more: https://docs.solidjs.com/solid-start/reference/client/mount */ export function mount(fn: () => JSX.Element, el: MountableElement) { - if (import.meta.env.START_ISLANDS) { - const map = new WeakMap(); - async function mountIsland(el: HTMLElement) { - if (el.dataset.css) { - let css = JSON.parse(el.dataset.css); - for (let href of css) { - if (!document.querySelector(`link[href="${href}"]`)) { - let link = document.createElement("link"); - link.rel = "stylesheet"; - link.href = href; - document.head.appendChild(link); - } - } - } - - let mod = await import( - /* @vite-ignore */ - import.meta.env.MANIFEST["client"]!.chunks[el.dataset.id!.split("#")[0] as string]!.output - .path - ); - if (!mod || !el.dataset.hk) return; - - let Component = mod[el.dataset.id!.split("#")[1] as string]; - let hk = el.dataset.hk; - // _$DEBUG("hydrating island", el.dataset.island, hk.slice(0, hk.length - 1) + `1-`, el); - - let props = createStore({ - ...JSON.parse(el.dataset.props!), - get children() { - const p = el.getElementsByTagName("solid-children"); - getHydrationKey(); - [...p].forEach(a => { - (a as any).__$owner = getOwner(); - }); - return; - }, - }); - - map.set(el, props); - - hydrate(() => createComponent(Component, props[0]), el, { - renderId: hk.slice(0, hk.length - 1) + `${1 + Number(el.dataset.offset)}-`, - owner: lookupOwner(el), - }); - - delete el.dataset.hk; - el.dataset.hkk = hk; - } - - let queue: HTMLElement[] = []; - let queued = false; - function runTaskQueue(info: any) { - while (info.timeRemaining() > 0 && queue.length) { - mountIsland(queue.shift()!); - } - if (queue.length) { - requestIdleCallback(runTaskQueue); - } else queued = false; - } - - const hydrateIslands = () => { - const islands: NodeListOf = document.querySelectorAll("solid-island[data-hk]"); - const assets = new Set(); - islands.forEach((el: HTMLElement) => el.dataset.id && assets.add(el.dataset.id)); - Promise.all( - [...assets].map( - asset => - import( - /* @vite-ignore */ import.meta.env.MANIFEST["client"]!.chunks[ - asset.split("#")[0] as string - ]!.output.path - ), - ), - ) - .then(() => { - islands.forEach((el: HTMLElement) => { - if (el.dataset.when === "idle" && "requestIdleCallback" in window) { - if (!queued) { - queued = true; - requestIdleCallback(runTaskQueue); - } - queue.push(el); - } else mountIsland(el as HTMLElement); - }); - }) - .catch(e => console.error(e)); - }; - - function lookupOwner(el: HTMLElement) { - const parent = el.closest("solid-children"); - return parent && (parent as any).__$owner; - } - - hydrateIslands(); - - return; - } return hydrate(fn, el); } diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts index 39a1d0afd..2523f2b6d 100644 --- a/packages/start/src/config/index.ts +++ b/packages/start/src/config/index.ts @@ -56,9 +56,6 @@ export function solidStart(options?: SolidStartOptions): Array { enforce: "pre", configEnvironment(name) { return { - define: { - "import.meta.env.SSR": JSON.stringify(name === VITE_ENVIRONMENTS.server), - }, resolve: { // remove when https://github.com/solidjs/vite-plugin-solid/pull/228 is released externalConditions: ["solid", "node"], diff --git a/packages/start/src/env.d.ts b/packages/start/src/env.d.ts index a2c99e4fb..fad2a39ab 100644 --- a/packages/start/src/env.d.ts +++ b/packages/start/src/env.d.ts @@ -1,33 +1,17 @@ -// This file is an augmentation to the built-in ImportMeta interface -// Thus cannot contain any top-level imports -// - -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -declare namespace App { - export interface RequestEventLocals { - [key: string | symbol]: any; - } -} +// This file contains global type definitions that are internal to SolidStart and are not exported declare module "solidstart:server-fn-manifest" { type ServerFn = (...args: Array) => Promise; export function getServerFnById(id: string): Promise; } -interface ImportMetaEnv extends Record<`VITE_${string}`, any>, SolidStartMetaEnv { - BASE_URL: string; - MODE: string; - DEV: boolean; - PROD: boolean; - SSR: boolean; -} +interface ImportMetaEnv extends SolidStartMetaEnv {} interface SolidStartMetaEnv { START_SSR: boolean; START_APP_ENTRY: string; START_CLIENT_ENTRY: string; - // START_ISLANDS: boolean; + START_ISLANDS: boolean; // START_DEV_OVERLAY: boolean; // SERVER_BASE_URL: string; } diff --git a/packages/start/tsconfig.json b/packages/start/tsconfig.json index 6eb9ea069..f0939803d 100644 --- a/packages/start/tsconfig.json +++ b/packages/start/tsconfig.json @@ -17,7 +17,7 @@ "types": ["vite/client"], "allowImportingTsExtensions": true, "rewriteRelativeImportExtensions": true, - "rootDir": "./src" + "rootDir": "./src", }, - "include": ["./src", "./src/env.d.ts"] + "include": ["env.d.ts", "./src", "./src/env.d.ts"], } From 744f6044c18fc4acdcb61e0dea87e8cf6383add3 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 21:07:19 +0800 Subject: [PATCH 3/8] reference vite/client in global env and modify fixture tsconfigs --- apps/fixtures/bare/tsconfig.json | 2 +- apps/fixtures/basic/tsconfig.json | 2 +- apps/fixtures/css/tsconfig.json | 6 +++--- apps/fixtures/experiments/tsconfig.json | 8 ++++---- apps/fixtures/hackernews/tsconfig.json | 2 +- apps/fixtures/nitro-3/tsconfig.json | 2 +- apps/fixtures/notes/tsconfig.json | 2 +- apps/fixtures/todomvc/tsconfig.json | 2 +- apps/landing-page/tsconfig.json | 7 ++++--- apps/tests/tsconfig.json | 8 ++++---- packages/start-nitro-v2-vite-plugin/tsconfig.json | 4 ++-- packages/start/env.d.ts | 2 ++ 12 files changed, 25 insertions(+), 22 deletions(-) diff --git a/apps/fixtures/bare/tsconfig.json b/apps/fixtures/bare/tsconfig.json index 28dd3c6d3..411ce3ba8 100644 --- a/apps/fixtures/bare/tsconfig.json +++ b/apps/fixtures/bare/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/fixtures/basic/tsconfig.json b/apps/fixtures/basic/tsconfig.json index 28dd3c6d3..411ce3ba8 100644 --- a/apps/fixtures/basic/tsconfig.json +++ b/apps/fixtures/basic/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/fixtures/css/tsconfig.json b/apps/fixtures/css/tsconfig.json index 1f0bda6da..e4bb71b1e 100644 --- a/apps/fixtures/css/tsconfig.json +++ b/apps/fixtures/css/tsconfig.json @@ -12,8 +12,8 @@ "noEmit": true, "isolatedModules": true, "paths": { - "~/*": ["./src/*"] + "~/*": ["./src/*"], }, - "types": ["vite/client"] - } + "types": ["@solidjs/start/env"], + }, } diff --git a/apps/fixtures/experiments/tsconfig.json b/apps/fixtures/experiments/tsconfig.json index b9f69f64a..411ce3ba8 100644 --- a/apps/fixtures/experiments/tsconfig.json +++ b/apps/fixtures/experiments/tsconfig.json @@ -11,9 +11,9 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/fixtures/hackernews/tsconfig.json b/apps/fixtures/hackernews/tsconfig.json index 28dd3c6d3..411ce3ba8 100644 --- a/apps/fixtures/hackernews/tsconfig.json +++ b/apps/fixtures/hackernews/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/fixtures/nitro-3/tsconfig.json b/apps/fixtures/nitro-3/tsconfig.json index dd9b7514e..434f11a9f 100644 --- a/apps/fixtures/nitro-3/tsconfig.json +++ b/apps/fixtures/nitro-3/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/fixtures/notes/tsconfig.json b/apps/fixtures/notes/tsconfig.json index 28dd3c6d3..411ce3ba8 100644 --- a/apps/fixtures/notes/tsconfig.json +++ b/apps/fixtures/notes/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/fixtures/todomvc/tsconfig.json b/apps/fixtures/todomvc/tsconfig.json index 28dd3c6d3..411ce3ba8 100644 --- a/apps/fixtures/todomvc/tsconfig.json +++ b/apps/fixtures/todomvc/tsconfig.json @@ -11,7 +11,7 @@ "strict": true, "noEmit": true, "isolatedModules": true, - "types": ["vite/client"], + "types": ["@solidjs/start/env"], "paths": { "~/*": ["./src/*"], }, diff --git a/apps/landing-page/tsconfig.json b/apps/landing-page/tsconfig.json index efcfe7f66..c95b9e538 100644 --- a/apps/landing-page/tsconfig.json +++ b/apps/landing-page/tsconfig.json @@ -8,8 +8,9 @@ "jsxImportSource": "solid-js", "jsx": "preserve", "baseUrl": "./", + "types": ["@solidjs/start/env"], "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/apps/tests/tsconfig.json b/apps/tests/tsconfig.json index 72133a12d..376a974e4 100644 --- a/apps/tests/tsconfig.json +++ b/apps/tests/tsconfig.json @@ -10,10 +10,10 @@ "allowJs": true, "strict": true, "noEmit": true, - "types": ["vitest/globals", "@testing-library/jest-dom"], + "types": ["vitest/globals", "@testing-library/jest-dom", "@solidjs/start/env"], "isolatedModules": true, "paths": { - "~/*": ["./src/*"] - } - } + "~/*": ["./src/*"], + }, + }, } diff --git a/packages/start-nitro-v2-vite-plugin/tsconfig.json b/packages/start-nitro-v2-vite-plugin/tsconfig.json index 93ff01e43..9a394befc 100644 --- a/packages/start-nitro-v2-vite-plugin/tsconfig.json +++ b/packages/start-nitro-v2-vite-plugin/tsconfig.json @@ -17,7 +17,7 @@ "types": ["vite/client"], "allowImportingTsExtensions": true, "rewriteRelativeImportExtensions": true, - "rootDir": "./src" + "rootDir": "./src", }, - "include": ["./src", "./src/env.d.ts"] + "include": ["./src", "./src/env.d.ts"], } diff --git a/packages/start/env.d.ts b/packages/start/env.d.ts index 526657708..2c9155d1c 100644 --- a/packages/start/env.d.ts +++ b/packages/start/env.d.ts @@ -1,5 +1,7 @@ // This file contains global type definitions that are exported as @solidjs/start/env +/// + declare namespace App { export interface RequestEventLocals { [key: string | symbol]: any; From 58affbccc3e2a24f16bc44102def2fba18607650 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 22:18:48 +0800 Subject: [PATCH 4/8] banish globa.d.ts --- apps/fixtures/bare/src/global.d.ts | 1 - apps/fixtures/basic/src/global.d.ts | 1 - apps/fixtures/css/src/global.d.ts | 1 - apps/fixtures/experiments/src/global.d.ts | 1 - apps/fixtures/hackernews/src/global.d.ts | 1 - apps/fixtures/nitro-3/src/global.d.ts | 1 - apps/fixtures/notes/src/global.d.ts | 1 - apps/fixtures/todomvc/src/global.d.ts | 7 ------- apps/landing-page/src/global.d.ts | 2 -- apps/tests/src/global.d.ts | 1 - 10 files changed, 17 deletions(-) delete mode 100644 apps/fixtures/bare/src/global.d.ts delete mode 100644 apps/fixtures/basic/src/global.d.ts delete mode 100644 apps/fixtures/css/src/global.d.ts delete mode 100644 apps/fixtures/experiments/src/global.d.ts delete mode 100644 apps/fixtures/hackernews/src/global.d.ts delete mode 100644 apps/fixtures/nitro-3/src/global.d.ts delete mode 100644 apps/fixtures/notes/src/global.d.ts delete mode 100644 apps/fixtures/todomvc/src/global.d.ts delete mode 100644 apps/tests/src/global.d.ts diff --git a/apps/fixtures/bare/src/global.d.ts b/apps/fixtures/bare/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/bare/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/basic/src/global.d.ts b/apps/fixtures/basic/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/basic/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/css/src/global.d.ts b/apps/fixtures/css/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/css/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/experiments/src/global.d.ts b/apps/fixtures/experiments/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/experiments/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/hackernews/src/global.d.ts b/apps/fixtures/hackernews/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/hackernews/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/nitro-3/src/global.d.ts b/apps/fixtures/nitro-3/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/nitro-3/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/notes/src/global.d.ts b/apps/fixtures/notes/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/fixtures/notes/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/fixtures/todomvc/src/global.d.ts b/apps/fixtures/todomvc/src/global.d.ts deleted file mode 100644 index 0682c3c14..000000000 --- a/apps/fixtures/todomvc/src/global.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module App { - interface RequestEventLocals { - /** - * Declare your getRequestEvent().locals here - */ - } -} diff --git a/apps/landing-page/src/global.d.ts b/apps/landing-page/src/global.d.ts index c7e166948..3b0dd1dd2 100644 --- a/apps/landing-page/src/global.d.ts +++ b/apps/landing-page/src/global.d.ts @@ -1,5 +1,3 @@ -/// - import { Session, User } from "lucia"; import { lucia } from "./db/auth"; diff --git a/apps/tests/src/global.d.ts b/apps/tests/src/global.d.ts deleted file mode 100644 index dc6f10c22..000000000 --- a/apps/tests/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// From d3c7a77cf76f1b181916a90115268671875a56b6 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 22:36:19 +0800 Subject: [PATCH 5/8] simplify env export --- packages/start/package.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/start/package.json b/packages/start/package.json index 2f3406744..79a129894 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -19,10 +19,7 @@ "./client/spa": "./src/client/spa/index.tsx", "./middleware": "./src/middleware/index.ts", "./http": "./src/http/index.ts", - "./env": { - "types": "./env.d.ts", - "import": null - } + "./env": "./env.d.ts" }, "publishConfig": { "access": "public", @@ -36,10 +33,7 @@ "./client/spa": "./dist/client/spa/index.jsx", "./middleware": "./dist/middleware/index.js", "./http": "./dist/http/index.js", - "./env": { - "types": "./env.d.ts", - "import": null - } + "./env": "./env.d.ts" } }, "dependencies": { From ce33624b2529fc1e14c3c99acd3289c41fc20457 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 23:49:38 +0800 Subject: [PATCH 6/8] directly re-export hydrate --- packages/start/src/client/mount.ts | 11 +---------- packages/start/src/server/handler.ts | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/start/src/client/mount.ts b/packages/start/src/client/mount.ts index a1e90c06a..7e17df7c7 100644 --- a/packages/start/src/client/mount.ts +++ b/packages/start/src/client/mount.ts @@ -1,10 +1 @@ -import type { JSX } from "solid-js"; -import { hydrate, type MountableElement } from "solid-js/web"; - -/** - * - * Read more: https://docs.solidjs.com/solid-start/reference/client/mount - */ -export function mount(fn: () => JSX.Element, el: MountableElement) { - return hydrate(fn, el); -} +export { hydrate as mount } from "solid-js/web" diff --git a/packages/start/src/server/handler.ts b/packages/start/src/server/handler.ts index 333ad60f4..d91453d93 100644 --- a/packages/start/src/server/handler.ts +++ b/packages/start/src/server/handler.ts @@ -71,7 +71,7 @@ export function createBaseHandler( const html = renderToString(() => { (sharedConfig.context as any).event = context; return fn(context); - }); + }, resolvedOptions); context.complete = true; if (context.response && context.response.headers.get("Location")) { From 459a1ca6d86f680ab0600c4177d27fe5cdc5c457 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Thu, 18 Dec 2025 23:55:03 +0800 Subject: [PATCH 7/8] Create brave-baboons-talk.md --- .changeset/brave-baboons-talk.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/brave-baboons-talk.md diff --git a/.changeset/brave-baboons-talk.md b/.changeset/brave-baboons-talk.md new file mode 100644 index 000000000..66c463eba --- /dev/null +++ b/.changeset/brave-baboons-talk.md @@ -0,0 +1,5 @@ +--- +"@fake-scope/fake-pkg": patch +--- + +Rework `@solidjs/start/env` From 4232aa1cd5e9395e64421b48f59e07735a34f1a7 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Fri, 19 Dec 2025 10:35:44 +0800 Subject: [PATCH 8/8] fix changeset --- .changeset/brave-baboons-talk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/brave-baboons-talk.md b/.changeset/brave-baboons-talk.md index 66c463eba..fb31c265e 100644 --- a/.changeset/brave-baboons-talk.md +++ b/.changeset/brave-baboons-talk.md @@ -1,5 +1,5 @@ --- -"@fake-scope/fake-pkg": patch +"@solidjs/start": patch --- Rework `@solidjs/start/env`