fix: concate with external runtime specific modules#9490
Merged
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
CodSpeed Performance ReportMerging #9490 will not alter performanceComparing 🎉 Hooray!
|
1763e34 to
9be0aa9
Compare
9be0aa9 to
da996b6
Compare
ahabhgk
approved these changes
Feb 27, 2025
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.
Summary
close #8649
Runtime Condition
Runtime Condition is used when an export is utilized in one runtime but not in another. Rspack will generate code like this:
This means that if users enter this code, the execution of 'foo' and its sub-modules will only occur if they go through the main runtime; otherwise, it can be skipped.
In our architecture, modules are connected through various connections. Some connections point to the same module, where one may be active in a particular runtime while others are not. This scenario can occur.
When this happens, we need to ensure that all connections are valid for the concatenated module to function properly.
We must guarantee that 'lib' can be active for all possible runtimes. In the previous implementation, we incorrectly used only one of valid runtime.
Checklist