Skip to content

Commit 86fd254

Browse files
authored
chore: add version limit explanation for remote module error handling blog (#3492)
1 parent 5caa5b0 commit 86fd254

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

apps/website-new/docs/en/blog/error-load-remote.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
# Handling Remote Module Loading Failures
1+
---
2+
title: Remote Rendering Error Handle Solutions
3+
---
4+
5+
# Remote Rendering Error Handle Solutions
26

37
import BlogGifGrid from '@components/BlogGifGrid.tsx';
48

9+
:::tip Version Requirement
10+
This solution requires `@module-federation/runtime` version 0.8.10 or above
11+
:::
12+
513
## Background
614
Remote module loading can fail due to various factors such as network resource loading failures or internal business logic rendering errors.
715

816
While Module Federation Runtime provides detailed error logging and runtime hooks to help users identify the cause of loading failures, we often need to implement error fallback mechanisms to handle these uncontrollable factors. This ensures the stability of the entire site and prevents a single remote module failure from causing the entire site to crash.
917

1018
## Solutions
1119

12-
To build a robust remote module loading mechanism, we can address potential issues at three levels:
20+
To build a robust remote module rendering mechanism, we can address potential issues at three levels:
21+
22+
> The following solutions can be referenced in the [router-demo](https://github.com/module-federation/core/tree/main/apps/router-demo) example.
23+
1324

1425
### Network Layer: Retry Mechanism
1526

apps/website-new/docs/zh/blog/error-load-remote.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# 远程模块加载失败处理方案
1+
---
2+
title: 远程模块渲染错误处理方案
3+
---
4+
5+
# 远程模块渲染错误处理方案
26

37
import BlogGifGrid from '@components/BlogGifGrid.tsx';
48

9+
10+
:::tip 版本要求
11+
此方案需要升级 `@module-federation/runtime` 版本至 0.8.10 或以上版本
12+
:::
13+
14+
515
## 背景
616
远程模块加载过程可能会因网络资源加载失败或自身业务逻辑渲染失败等因素造成远程模块加载失败。
717

@@ -11,6 +21,8 @@ import BlogGifGrid from '@components/BlogGifGrid.tsx';
1121

1222
为了构建一个健壮的远程模块加载机制,我们可以从以下三个层面来处理可能出现的问题:
1323

24+
> 以下解决方案均可参考 [router-demo](https://github.com/module-federation/core/tree/main/apps/router-demo) 中示例。
25+
1426
### 网络层:重试机制
1527

1628
使用 [`@module-federation/retry-plugin`](https://module-federation.io/zh/plugin/plugins/retry-plugin.html) 插件来处理网络相关的问题:

0 commit comments

Comments
 (0)