Skip to content
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

WIP: allow errorLoadRemote hook catch remote entry resource loading error #3474

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

danpeen
Copy link
Contributor

@danpeen danpeen commented Feb 2, 2025

Description

feat: allow errorLoadRemote hook can catch remote entry resource loading error.

releated issue: #3452

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Copy link

netlify bot commented Feb 2, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 0d393fc
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/67a3571ad3c7ee0008f9ce27
😎 Deploy Preview https://deploy-preview-3474--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@danpeen danpeen changed the title feat: allow errorLoadRemote hook can catch remote entry resource loading error WIP: allow errorLoadRemote hook can catch remote entry resource loading error Feb 2, 2025
Copy link

changeset-bot bot commented Feb 2, 2025

🦋 Changeset detected

Latest commit: 0d393fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
@module-federation/runtime-core Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/devtools Patch
@module-federation/data-prefetch Patch
@module-federation/dts-plugin Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/retry-plugin Patch
@module-federation/runtime-tools Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/enhanced Patch
@module-federation/modern-js Patch
@module-federation/rspack Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/rsbuild-plugin Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/sdk Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/error-codes Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

@danpeen danpeen changed the title WIP: allow errorLoadRemote hook can catch remote entry resource loading error WIP: allow errorLoadRemote hook catch remote entry resource loading error Feb 5, 2025
@danpeen danpeen changed the title WIP: allow errorLoadRemote hook catch remote entry resource loading error feat(runtime): allow errorLoadRemote hook catch remote entry resource loading error Feb 5, 2025
@@ -129,6 +167,16 @@ const App = () => {
path="/remote1/*"
Component={() => (
<Remote1App name={'Ming'} age={12} ref={ref} basename="/remote1" />
// <Remote1AppWithErrorBoundary
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be deleted directly

return {
name: 'fallback-plugin',
async errorLoadRemote(args) {
// if (args.lifecycle === 'onLoad') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply delete redundant comments

@danpeen danpeen changed the title feat(runtime): allow errorLoadRemote hook catch remote entry resource loading error WIP: allow errorLoadRemote hook catch remote entry resource loading error Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants