From 48a36575199fcd2b4d702c0069b4bccdd5abf477 Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Wed, 15 Jul 2026 16:23:43 -0500 Subject: [PATCH 1/2] fix: bundle h3 and cookie-es into the server build If h3 and cookie-es stay external, the SSR build emits bare imports that nitro later re-resolves from the project root, where package managers like yarn may have hoisted the older major versions required by nitropack and unstorage (h3 v1 / cookie-es v1) instead of the versions @solidjs/start needs. Bundling them into entry-server.js removes the bare imports so the wrong copy can never be resolved. Fixes #2101 Fixes #2178 Co-Authored-By: Claude Fable 5 --- packages/start/src/config/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/start/src/config/index.ts b/packages/start/src/config/index.ts index 447f26ab7..b40c21ddb 100644 --- a/packages/start/src/config/index.ts +++ b/packages/start/src/config/index.ts @@ -158,7 +158,14 @@ export function solidStart(options?: SolidStartOptions): Array { }, // Depending on the package manager and dependency structure Vite externalizes @solidjs/start // This makes sure that @solidjs/start goes through the Vite build process - noExternal: ["@solidjs/start"], + // + // h3 and cookie-es must be bundled as well: if they stay external, the server build + // emits bare imports that nitro later re-resolves from the project root, where package + // managers like yarn may have hoisted the older major versions required by nitropack + // and unstorage (h3 v1 / cookie-es v1) instead of the versions @solidjs/start needs + // (see https://github.com/solidjs/solid-start/issues/2101 + // and https://github.com/solidjs/solid-start/issues/2178) + noExternal: ["@solidjs/start", "h3", "cookie-es"], }, define: { "import.meta.env.MANIFEST": `globalThis.MANIFEST`, From 0a4dff9c53521932f609e9d170f810afb830242a Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Thu, 16 Jul 2026 08:14:15 -0500 Subject: [PATCH 2/2] chore: add changeset for bundled server dependencies --- .changeset/bundle-h3-cookie.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/bundle-h3-cookie.md diff --git a/.changeset/bundle-h3-cookie.md b/.changeset/bundle-h3-cookie.md new file mode 100644 index 000000000..cd1e7bc55 --- /dev/null +++ b/.changeset/bundle-h3-cookie.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +Bundle `h3` and `cookie-es` into server builds to avoid resolving incompatible hoisted versions