Skip to content

Commit 0bb0217

Browse files
committed
docs: add shared.shareScope
1 parent 28a2f58 commit 0bb0217

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

apps/website-new/docs/en/configure/shared.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interface SharedConfig {
1919
singleton?: boolean;
2020
requiredVersion?: string;
2121
eager?: boolean;
22+
shareScope?: string;
2223
}
2324
```
2425

@@ -76,6 +77,14 @@ Whether to immediately load the shared module.
7677

7778
Under normal circumstances, you need to enable lazy entry, and then asynchronously load shared modules on demand. If you want to use shared but do not want to enable lazy entry, you can set `eager` to true.
7879

80+
## shareScope
81+
82+
- Type: `string`
83+
- Required: No
84+
- Default: `'default'`
85+
86+
share scope name, default value is `'default'` .
87+
7988
## FAQ
8089

8190
### When to use shared dependencies

apps/website-new/docs/zh/configure/shared.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interface SharedConfig {
1919
singleton?: boolean;
2020
requiredVersion?: string;
2121
eager?: boolean;
22+
shareScope?: string;
2223
}
2324
```
2425

@@ -76,6 +77,14 @@ new ModuleFederationPlugin({
7677

7778
正常情况下,需要开启异步入口,随后按需异步加载 shared 。 若想使用 shared ,但又不想开启异步入口,那么可以设置 `eager` 为 true 。
7879

80+
## shareScope
81+
82+
- 类型:`string`
83+
- 是否必填:否
84+
- 默认值:`'default'`
85+
86+
共享依赖作用域,默认值为 `'default'`
87+
7988
## FAQ
8089

8190
### 何时使用共享依赖

0 commit comments

Comments
 (0)