Repository navigation
Conversation
- New start.earlyHints option, off by default, as SolidStart's earlyHints. - Before a page renders, the generated handler builds Link values for the client entry, its static imports, and their stylesheets from the client manifest. - handleRequest accepts an earlyHints(links) callback. The start.node entry and vite preview pass one that sends a real 103. - Without a callback, the links are added as Link headers on the page. - New early-hints mode in the start-ssr e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a08788b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
brenelz
approved these changes
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
start.earlyHints, off by default. A production SSR build sends the client entry's scripts and stylesheets as103 Early Hintsbefore a page renders, so the browser starts downloading them while the server runs middleware,setupand the render. It is the counterpart of SolidStart'searlyHints.Changes
Linkvalues from the client manifest. They cover the client entry, its static imports (rel=modulepreload), and their stylesheets (rel=preload; as=style). The list is computed once per process.handleRequest(request, { earlyHints })takes a callback that receives the links. Thestart.nodeentry andvite previewpass one that callsres.writeEarlyHints(), through a newnodeEarlyHintshelper insrc/http.ts.Linkheaders on the page response, through the request event's response stub. CDNs such as Cloudflare turn those into103responses.earlyHintsoption is rejected like the otherhandleRequestoptions.resolveClientEntrynow shares aclientEntryKey()helper with the hint walk. Its behavior is unchanged.earlyHintssection.Not included
Testing
early-hintsmode inexamples/start-ssr/test/run.mjs, 12 assertions. It usesnode:httpto see the1xxresponses:start.node: a page gets a103, the hinted entry script is the one the page loads, the hinted stylesheets are the page's, every hinted URL answers 200, the final response has noLinkheader, and a server-function request gets no hints.server.js(callshandleRequestwithout a callback): no103, and the same links arrive asLinkheaders.vite preview: a page gets a103.103and noLinkheader.node(89),preview(50) andprod(77) modes, theexamples/start-clientsuite (70) andvitest runstill pass.🤖 Generated with Claude Code