fix: symbolicate Module Federation remote stack frames - #1434
Conversation
|
@MikitasK is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 9f0555a The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 |
| /** | ||
| * Cache with initialized `SourceMapConsumer` to improve symbolication performance. | ||
| */ | ||
| sourceMapConsumerCache: Record<string, SourceMapConsumer> = {}; |
There was a problem hiding this comment.
how does the performance compare? seems like we had this sourceMapConsumerCache for performance reasons.
is it not possible now that subsequent requests will have to recalculate? or am I misunderstanding?
There was a problem hiding this comment.
basically, we shouldn’t lose any work across calls because old cache was already destroyed & cleared after every process() call
just to be safe, I double-checked this & didn’t observe any performance regression. also, I added tests covering same-request reuse, refresh between requests & concurrent requests
Summary
Closes #1433
Fixes development stack-trace symbolication for Module Federation bundles served by a separate Re.Pack dev server.
Previously, the host tried to find remote source maps in its own compiler assets, resulting in:
this change:
webpack://source URLssourcesContentfor code framesRecording
mf_error_symbolication_fix.mp4
Test Plan
apps/tester-federation-v2source map is missingerror is reported for the remote chunk