Repository navigation
Conversation
createHydrationScripts received router.options.ssr?.nonce by value when the SSR utils were attached, so a nonce set afterwards (for example in the createStartHandler callback) never reached the hydration script tags. Pass a getter and read it when the tags are built. Fixes TanStack#8789 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: bf0adb2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
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 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🎯 Changes
Fixes #8789
#8204 started reading
ssr.nonceonce, whenattachRouterServerSsrUtilsruns, so a nonce set later (like in thecreateStartHandlercallback from the issue) never reaches the hydration scripts. This passes a getter tocreateHydrationScriptsso the nonce is read when the tags are built, the same way the bindings' otherssr.noncereads work. The new test intransformStreamWithRouter.test.tsfails without the change. I also ran the issue's setup in a built Start app, and the stream-part and trailing scripts get the nonce again. I didn't add the docs or dev warning the issue offers as an alternative, since this restores the old behaviour.Written with help from Claude Code; I reviewed and tested it.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit