mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/151
Author: @yunus25jmi1
Created: 2/27/2026
Status: ✅ Merged
Merged: 3/4/2026
Merged by: @southpolesteve
Base:
main← Head:fix/issue-145-server-inserted-html-context📝 Commits (1)
4e2ae23fix: export ServerInsertedHTMLContext from next/navigation shim (#145)📊 Changes
4 files changed (+238 additions, -3 deletions)
View changed files
📝
packages/vinext/src/server/app-dev-server.ts(+13 -3)📝
packages/vinext/src/shims/navigation.ts(+21 -0)📝
packages/vinext/src/shims/next-shims.d.ts(+3 -0)➕
tests/server-inserted-html-context.test.ts(+201 -0)📄 Description
Issue
Fixes #145: @apollo/client-integration-nextjs requires
ServerInsertedHTMLContextto be exported fromnext/navigationfor proper SSR support.Root Cause Analysis
Apollo Client, styled-components, emotion, StyleX and other CSS-in-JS libraries need to import
ServerInsertedHTMLContextfromnext/navigationfor SSR integration. The context was missing from vinext'snext/navigationshim, causing import errors.This is not a patch—it's a root cause fix addressing a gap in the API surface. vinext aims to provide full Next.js API compatibility, but was missing this documented public export.
Changes
Added to
packages/vinext/src/shims/navigation.ts:ServerInsertedHTMLContextexport - A React Context for CSS-in-JS libraries to inject HTML during SSRgetServerInsertedHTMLContext()helper - Consistent with existinggetLayoutSegmentContext()patternReact.createContextis available (not in react-server condition)Testing
Security
Verification
Type of Change
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.