Repository navigation
Conversation
`Graph` threads a `RequireContext` per module from `buildSubgraph` through commit, snapshots and release, so that the transformer can render a context module's template. It's the one place Metro carries a transform's input on a dependency edge rather than reading it from disk. This generalises that slot to `VirtualSource`, a tagged union whose only arm for now is a `require.context`'s parameters, so that a virtual module's source can travel the same way (#2036) rather than through a second mechanism beside it. `ModuleData.resolvedContexts` becomes `virtualSources`, and `markModifiedContextModules` only considers context entries. Changelog: Internal
robhogan
added this pull request to stack #2042
October 8, 2026 12:56
RequireContext)
robhogan
marked this pull request as ready for review
October 8, 2026 13:29
This branch has not been deployed
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.
Graphthreads aRequireContextper module frombuildSubgraphthrough commit, snapshots and release, so that the transformer can render a context module's template. It's the one place Metro carries a transform's input on a dependency edge rather than reading it from disk.This generalises that slot to
VirtualSource, a union whose only member for now isrequire.context's parameters.ModuleData.resolvedContextsbecomesvirtualSources, andmarkModifiedContextModulesonly considers context entries.This takes some of the noise out #2036 for ease of review, and should be read in the context of that design. No behaviour or API change.
Changelog: Internal