Skip to content

Commit 69cc2e2

Browse files
docs(ssr): hand-built documents must load the client entry deferred, not async; changeset for the #3615 revert
Co-authored-by: Cursor <[email protected]>
1 parent cdd1943 commit 69cc2e2

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/web": patch
3+
---
4+
5+
Revert #3615: `hydrate()` no longer defers on `_$HY.p`; the ordering it guarded against does not occur in a correctly assembled document.

‎documentation/solid-2.0/12-ssr-http.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Server (`@solidjs/web` under the `node`/`deno`/`worker` conditions):
2828

2929
For hydration, the document needs the hydration script ahead of the app markup: `generateHydrationScript({ nonce?, eventNames? })` returns it as a string for hand-built documents, and `<HydrationScript />` renders it in JSX documents.
3030

31+
In a hand-built document the render output ends with the serialized hydration records (`_$HY.r`), written by a classic inline `<script>`. The client entry must execute after that script: make it a deferred `<script type="module">` (or a `defer` classic script), or place it after the render output — never `async`, which may run before the records have been parsed and hydrate against an empty document. `<HydrationScript />` documents handle the ordering themselves: the records script is spliced immediately after the bootstrap, so the entry may be `async` there.
32+
3133
### Consuming the stream: `pipe`, `pipeTo`, `readable`
3234

3335
`renderToStream` returns a result with three consumption surfaces — **exactly one may be used per render** (a second consumer throws with a directed message):

‎scripts/size/.size-limit.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,12 @@ module.exports = [
15141514
// the ruling forbids. The no-stores companion carries the same source at
15151515
// +32 B (-12 B before the rebase — brotli layout over the smaller
15161516
// bundle). 0 B in the signals core, the store engine, or web.
1517-
limit: "31.2 KB",
1517+
// Revert of #3615 (#3618, 2026-09-23): the hydrate() gate's +129 B is
1518+
// gone, and #3616's bump is re-expressed over the pre-#3615 baseline:
1519+
// 31.2 -> 31.25 KB, measured at 31,220 B (#3616's own +65 B over the
1520+
// pre-#3615 31,155, as its note above recorded). The no-stores entry
1521+
// returns to its pre-#3615 20.95 KB cap, measured at 20,907 B.
1522+
limit: "31.25 KB",
15181523
modifyEsbuildConfig
15191524
},
15201525
{

0 commit comments

Comments
 (0)