Fix inlineCss re-inlining stylesheets for the global error boundary - #98136
Open
akash-dabhi-qed wants to merge 1 commit into
Open
Fix inlineCss re-inlining stylesheets for the global error boundary#98136akash-dabhi-qed wants to merge 1 commit into
akash-dabhi-qed wants to merge 1 commit into
Conversation
akash-dabhi-qed
force-pushed
the
fix/98110-inline-css-duplication
branch
from
September 1, 2026 12:56
981327d to
c5f972e
Compare
akash-dabhi-qed
force-pushed
the
fix/98110-inline-css-duplication
branch
from
September 1, 2026 13:04
c5f972e to
96469c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Previously we got stylesheet embeded thrice via inlineCss, 2 of them were documented and needed, the third came from a global error boundary. The app-renderer now limits the stylesheet data to the two documented copies.
Why?
One copy of inlineCss previous embeddings weighed 3x for turbopack, when only 2x of useful data was needed, the pr fixes this, it removes the redundant copy of data.
How?
Following changes were made to resolve the issue:
getRSCPayloadpassesctx.inlinedCSSPaths, whilegetErrorRSCPayloadpasses a freshSet(), since that document renders an error shell rather than the loader tree and sharesctxwith the render that usually just failed.AppRenderContextgainedinlinedCSSPaths: Set<string>, one per request.getLayerAssetsandcreateComponentStylesAndScripts, now record each emitted path into it.getGlobalErrorStylestakes the inlined set as an explicit argument and consults it.Result: global-error skips sheets the document already has, and the G entry becomes "G":["$f",[]].
Fixes #98110