-
-
Notifications
You must be signed in to change notification settings - Fork 374
fix: call initializeSharing before load remote while shareStrategy is version first #3212
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
Conversation
🦋 Changeset detectedLatest commit: 2708f0c The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 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 |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Summary
The pull request introduces a bug fix to the remote module in the runtime package. The core change ensures that the initializeSharing function is called before executing loadRemote or loadShare when the shareStrategy is set to 'version-first'. This change helps to ensure that the remote shareScopeMap has been registered before attempting to load the remote module. The change addresses an issue where the remote module may not have been properly registered, causing issues when loading the remote module.
File Summaries
| File | Summary |
|---|---|
| packages/runtime/src/remote/index.ts | The code changes introduce a fix to ensure that the initializeSharing function is called before executing loadRemote or loadShare when the shareStrategy is set to 'version-first'. This change helps to ensure that the remote shareScopeMap has been registered before attempting to load the remote module. |
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.
Incremental Review
Comments posted: 6
Configuration
Squadron Mode: essential
Commits Reviewed
96efa7c9d967fe31f62fdf38ea47b2f71b1d53ce...2708f0cd01a0eee43bbf358560d41051e9d0684e
Files Reviewed
- packages/runtime/src/core.ts
- packages/runtime/src/remote/index.ts
Files Ignored
These files were ignored due to the filter in the squadron.yaml file.
- .changeset/nervous-tomatoes-marry.md
- packages/webpack-bundler-runtime/src/remotes.ts
Description
When shareStrategy is 'version-first' , it should make sure the remote shareScopeMap have been registered yet . So it should call initializeSharing before executing loadRemote/loadShare
Related Issue
#3209
Types of changes
Checklist