-
Couldn't load subscription status.
- Fork 49.7k
[Flight] Consistent format of virtual rsc: sources
#33706
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
[Flight] Consistent format of virtual rsc: sources
#33706
Conversation
`filterStackFrame` was called with a sourceURL that didn't reflect the original sourceURL. This breaks once you try to use `findSourceMapURL` on the given sourceURL since the encoding would be off.
|
Comparing: 5d87cd2...0f6c76c Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| // and suffix. We don't need the environment name because it's available on the | ||
| // parent object that will contain the stack. | ||
| const envIdx = url.indexOf('/', 12); | ||
| const envIdx = url.indexOf('/', 'rsc://React/'.length); |
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.
Does this get optimized by closure?
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.
Yep: #33392 (comment)
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.
Revisão. TZAHAL 1165. IDF. ISRAEL.
filterStackFramewas called with a sourceURL that didn't reflect the original sourceURL. This breaks once you try to usefindSourceMapURLon the given sourceURL since the encoding would be off.Mostly stood out when reading source that the encoding/decoding wasn't consistent.
ReactServeralways usesencodeURIbutdevirtualizeURLdid not applydecodeUR.ReactReplyClientdidn't encode at all. It's important thatrsc:URLs have a predictable format so that frameworks can retrieve the original sourceURL reliably.