Skip to content

Commit 67fd33e

Browse files
authored
docs(split-chunks): update module federation compatibility note (#12178)
1 parent 91fb897 commit 67fd33e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

website/docs/en/plugins/webpack/split-chunks-plugin.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ export default {
129129
```
130130

131131
:::tip
132-
When using [Module Federation](/guide/features/module-federation), if the application uses `exposes` to expose remote modules, `chunks: 'all'` cannot be used as it would break the remote module splitting.
132+
133+
Before Rspack v1.6.2, projects using [Module Federation](/guide/features/module-federation) with exposes could not enable `chunks: 'all'`, as it would break remote module splitting.
134+
135+
Starting from v1.6.2, Module Federation works seamlessly with `chunks: 'all'`.
136+
133137
:::
134138

135139
The `chunks` option can be set to a regular expression, which is a shorthand for `(chunk) => typeof chunk.name === "string" && regex.test(chunk.name)`.

website/docs/zh/plugins/webpack/split-chunks-plugin.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ export default {
127127
```
128128

129129
:::tip
130-
在使用 [模块联邦](/guide/features/module-federation) 时,如果应用使用了 `exposes` 来暴露出远程模块,则无法使用 `chunks: 'all'`,因为这会破坏远程模块的拆分。
130+
131+
在 Rspack v1.6.2 之前,使用 [模块联邦](/guide/features/module-federation) 并配置 `exposes` 时无法开启 `chunks: 'all'`,否则会破坏远程模块拆分。
132+
133+
从 v1.6.2 起,可以同时使用模块联邦和 `chunks: 'all'`
134+
131135
:::
132136

133137
`chunks` 选项可以设置为正则表达式,它是 `(chunk) => typeof chunk.name === "string" && regex.test(chunk.name)` 的缩写。

0 commit comments

Comments
 (0)