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
5 changes: 5 additions & 0 deletions .changeset/bundle-h3-cookie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/start": patch
---

Bundle `h3` and `cookie-es` into server builds to avoid resolving incompatible hoisted versions
9 changes: 8 additions & 1 deletion packages/start/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ export function solidStart(options?: SolidStartOptions): Array<PluginOption> {
},
// 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
Comment thread
birkskyum marked this conversation as resolved.
// 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`,
Expand Down
Loading