-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
fix(node): allow fetch override on runtime plugin #2603
Merged
ScriptedAlchemy
merged 14 commits into
main
from
fix/allow-node-runtime-plugin-override
Jun 27, 2024
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ab59feb
fix(node): allow fetch override on runtime plugin
ScriptedAlchemy a2048ee
Merge branch 'main' into fix/allow-node-runtime-plugin-override
ScriptedAlchemy ee396cf
Merge branch 'main' into fix/allow-node-runtime-plugin-override
ScriptedAlchemy b6b61a2
Merge branch 'main' into fix/allow-node-runtime-plugin-override
ScriptedAlchemy dd78c87
Update packages/node/src/runtimePlugin.ts
ScriptedAlchemy 0351899
Update packages/node/src/runtimePlugin.ts
ScriptedAlchemy c0deb0b
Merge branch 'main' into fix/allow-node-runtime-plugin-override
ScriptedAlchemy 19f4450
Merge branch 'main' into fix/allow-node-runtime-plugin-override
ScriptedAlchemy 2379fb2
Merge branch 'refs/heads/main' into fix/allow-node-runtime-plugin-ove…
ScriptedAlchemy d64ba3d
Merge remote-tracking branch 'origin/fix/allow-node-runtime-plugin-ov…
ScriptedAlchemy 115578b
fix(node): fix missing load var on chunk config
ScriptedAlchemy 58638ba
fix(node): use loader hook fetch lifecycle
ScriptedAlchemy b121e85
fix(node): implement fetch hook in all locations
ScriptedAlchemy 71b0887
fix(node): refactor runtime plugin
ScriptedAlchemy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@module-federation/sdk': patch | ||
--- | ||
|
||
allow global fetch override for node |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@module-federation/node': patch | ||
--- | ||
|
||
allow fetch override on runtime plugin with globalThis.webpackChunkLoad |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
core/packages/runtime/src/core.ts
Line 105 in 05c43f3
Maybe we can set fetch through fetch hook instead of using global variables
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.
@zhoushaw do you have a sample of how to use the fetch hook?
I do not think it is bound to script loader, only json manifest loader
This provides backward compat for user, but i am happy to look at better solution for future and deprecate this usage