Skip to content

Commit 7eade4f

Browse files
authored
Merge branch 'module-federation:main' into main
2 parents 1a881c0 + 22107da commit 7eade4f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

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

+11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ interface SharedConfig {
2020
requiredVersion?: string;
2121
eager?: boolean;
2222
shareScope?: string;
23+
import?: string | false;
2324
}
2425
```
2526

@@ -85,6 +86,16 @@ Under normal circumstances, you need to enable lazy entry, and then asynchronous
8586

8687
share scope name, default value is `'default'` .
8788

89+
## import
90+
91+
- Type: `string | false`
92+
- Required: No
93+
- Default: `undefined`
94+
95+
Control import path of shared dependencies, default value is `undefined` .
96+
97+
If set to `false`, this shared will not be packaged into the product, and only the `shared` provided by the consumer will be used. Therefore, please make sure that the consumer has provided the corresponding `shared` before setting.
98+
8899
## FAQ
89100

90101
### When to use shared dependencies

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

+11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ interface SharedConfig {
2020
requiredVersion?: string;
2121
eager?: boolean;
2222
shareScope?: string;
23+
import?: string | false;
2324
}
2425
```
2526

@@ -85,6 +86,16 @@ new ModuleFederationPlugin({
8586

8687
共享依赖作用域,默认值为 `'default'`
8788

89+
## import
90+
91+
- 类型:`string | false`
92+
- 是否必填:否
93+
- 默认值:`undefined`
94+
95+
共享依赖的导入路径,默认值为 `undefined`
96+
97+
若设置为 `false` ,则不会将此 shared 打包到产物中,仅使用消费者提供的 `shared`。 因此设置前请确认消费者已提供对应 `shared`
98+
8899
## FAQ
89100

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

0 commit comments

Comments
 (0)