-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(react-router): Add support for Hydrogen with RR7 #17145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
e84f411
to
305c9c2
Compare
305c9c2
to
a38286d
Compare
}); | ||
|
||
return stream; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Stream Handling and Data Type Inconsistency
The injectTraceMetaTags
function has two bugs. It incorrectly assumes the </head>
tag will always be contained within a single ReadableStream
chunk. If the tag is split across chunks, the includes
check fails, preventing Sentry trace meta tags from being injected and breaking distributed tracing. Additionally, the function outputs inconsistent data types: it encodes modified HTML as Uint8Array
but passes through unmodified chunks as their original type (e.g., string
), which can cause issues for downstream consumers.
Hydrogen switched from Remix v2 to React Router 7 (framework mode) from version
2025.5.0
.This PR adds support for React Router 7 (framework) SDK, adding a new entry point for cloudflare environments, and making a few structural changes.
@sentry/react-router/cloudflare
entrypoint, similarly to what we have done on@sentry/remix/cloudflare
.injectTraceMetaTags
to supportReadableStream
which is used instead ofPipeableStream
(which we cover ongetMetaTagTransformer
for node environments), on cloudflare environments.Note: Needs documentation update if approved.