Skip to content

Commit 30571f1

Browse files
author
nyqykk
committed
chore: revert version change
1 parent 784fc3b commit 30571f1

File tree

7 files changed

+30
-28
lines changed

7 files changed

+30
-28
lines changed

examples/module-federation/mf-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"devDependencies": {
1515
"@module-federation/rsbuild-plugin": "0.0.2",
16-
"@rsbuild/core": "^1.x",
16+
"@rsbuild/core": "~1.0.14",
1717
"@rsbuild/plugin-react": "^1.0.4",
1818
"@types/react": "^18.3.11",
1919
"@types/react-dom": "^18.3.1",

examples/module-federation/mf-remote/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"devDependencies": {
1515
"@module-federation/rsbuild-plugin": "0.0.2",
16-
"@rsbuild/core": "^1.x",
16+
"@rsbuild/core": "~1.0.14",
1717
"@rsbuild/plugin-react": "^1.0.4",
1818
"@types/react": "^18.3.11",
1919
"@types/react-dom": "^18.3.1",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"prebundle": "prebundle"
3838
},
3939
"dependencies": {
40-
"@rsbuild/core": "^1.x",
40+
"@rsbuild/core": "~1.0.14",
4141
"rsbuild-plugin-dts": "workspace:*"
4242
},
4343
"devDependencies": {

packages/plugin-dts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"devDependencies": {
3737
"@microsoft/api-extractor": "^7.47.9",
38-
"@rsbuild/core": "^1.x",
38+
"@rsbuild/core": "~1.0.14",
3939
"@rslib/tsconfig": "workspace:*",
4040
"rslib": "npm:@rslib/[email protected]",
4141
"typescript": "^5.6.3"

website/docs/en/guide/advanced/module-federation.mdx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,33 @@ Module Federation is a JavaScript application divide-and-conquer architecture pa
1010

1111
Module federation has some typical usage scenarios, including:
1212

13-
Allows independent applications (called "Micro-Frontend" in the Micro-Frontend architecture) to share modules without having to recompile the entire application.
14-
Different teams work on different parts of the same application without having to recompile the entire application.
15-
Dynamic code loading and sharing between applications at runtime.
16-
Module federation can help you:
13+
- Allows independent applications (called "Micro-Frontend" in the Micro-Frontend architecture) to share modules without having to recompile the entire application.
14+
- Different teams work on different parts of the same application without having to recompile the entire application.
15+
- Dynamic code loading and sharing between applications at runtime.
16+
17+
Module Federation can help you:
1718

1819
- Reduce code duplication
1920
- Improve code maintainability
2021
- Reduce the overall size of the application
2122
- Improve application performance
2223

23-
## Quick access
24+
## Quick Start
2425

25-
First install the Module Federation Rsbuild Plugin (Rslib is built on Rsbuild)
26+
First install the Module Federation Rsbuild Plugin (Rslib is based on Rsbuild).
2627

2728
import { PackageManagerTabs } from '@theme';
2829

2930
<PackageManagerTabs
3031
command={{
31-
npm: 'npm add @module-federation/rsbuild-plugin --save-dev',
32-
yarn: 'yarn add @module-federation/rsbuild-plugin --save-dev',
33-
pnpm: 'pnpm add @module-federation/rsbuild-plugin --save-dev',
34-
bun: 'bun add @module-federation/rsbuild-plugin --save-dev',
32+
npm: 'npm add @module-federation/rsbuild-plugin -D',
33+
yarn: 'yarn add @module-federation/rsbuild-plugin -D',
34+
pnpm: 'pnpm add @module-federation/rsbuild-plugin -D',
35+
bun: 'bun add @module-federation/rsbuild-plugin -D',
3536
}}
3637
/>
3738

38-
Add the plugin to the `rslib.config.ts` file
39+
Add the plugin to the `rslib.config.ts` file:
3940

4041
```ts title='rslib.config.ts'
4142
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';

website/docs/zh/guide/advanced/module-federation.mdx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ Module Federation 是一种 JavaScript 应用分治的架构模式(类似于
1010

1111
模块联邦有一些典型的使用场景,包括:
1212

13-
允许独立应用(在微前端架构中称为"微前端")之间共享模块,无需重新编译整个应用。
14-
不同的团队在不需要重新编译整个应用的情况下处理同一应用的不同部分。
15-
应用之间在运行时进行动态代码加载和共享。
13+
- 允许独立应用(在微前端架构中称为"微前端")之间共享模块,无需重新编译整个应用。
14+
- 不同的团队在不需要重新编译整个应用的情况下处理同一应用的不同部分。
15+
- 应用之间在运行时进行动态代码加载和共享。
16+
1617
模块联邦可以帮助你:
1718

1819
- 减少代码重复
@@ -22,20 +23,20 @@ Module Federation 是一种 JavaScript 应用分治的架构模式(类似于
2223

2324
## 快速接入
2425

25-
首先安装 Module Federation Rsbuild 插件(Rslib 基于 Rsbuild 构建)
26+
首先安装 Module Federation Rsbuild 插件Rslib 基于 Rsbuild 实现)。
2627

2728
import { PackageManagerTabs } from '@theme';
2829

2930
<PackageManagerTabs
3031
command={{
31-
npm: 'npm add @module-federation/rsbuild-plugin --save-dev',
32-
yarn: 'yarn add @module-federation/rsbuild-plugin --save-dev',
33-
pnpm: 'pnpm add @module-federation/rsbuild-plugin --save-dev',
34-
bun: 'bun add @module-federation/rsbuild-plugin --save-dev',
32+
npm: 'npm add @module-federation/rsbuild-plugin -D',
33+
yarn: 'yarn add @module-federation/rsbuild-plugin -D',
34+
pnpm: 'pnpm add @module-federation/rsbuild-plugin -D',
35+
bun: 'bun add @module-federation/rsbuild-plugin -D',
3536
}}
3637
/>
3738

38-
将插件添加到 `rslib.config.ts`
39+
将插件添加到 `rslib.config.ts`
3940

4041
```ts title='rslib.config.ts'
4142
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
@@ -78,11 +79,11 @@ export default defineConfig({
7879
});
7980
```
8081

81-
这样我们就完成了 Rslib Module 作为生产者的接入,构建完成后可以看到产物中新增了 mf 目录,消费者可以直接消费这个包
82+
这样我们就完成了 Rslib Module 作为生产者的接入,构建完成后可以看到产物中新增了 mf 目录,消费者可以直接消费这个包
8283

83-
在上面的例子中我们增加了一个新的 `format: 'mf'`这会帮助你新增一份额外的 Module Federation 产物,与此同时还可以配置 `cjs``esm` 的 format,这并不冲突
84+
在上面的例子中,我们设置了一个新的 `format: 'mf'`这会帮助你生成一份额外的 Module Federation 产物,与此同时,还可以配置 `cjs``esm` 的 format,它们互相不冲突
8485

85-
但是如果希望这个 Rslib Module 同时可以消费其他生产者,请不要使用构建配置 `remote` 参数,因为在其他 format 中,这可能会导致错误,请参考下方使用 Module Federation 运行时的例子
86+
如果你希望这个 Rslib Module 同时可以消费其他生产者,请不要使用构建配置 `remote` 参数,因为在其他 format 中,这可能会导致错误,请参考下方使用 Module Federation 运行时的例子
8687

8788
## 消费其他 Module Federation 模块
8889

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "rspress preview"
1010
},
1111
"devDependencies": {
12-
"@rsbuild/core": "^1.x",
12+
"@rsbuild/core": "~1.0.14",
1313
"@rslib/tsconfig": "workspace:*",
1414
"@rstack-dev/doc-ui": "1.5.2",
1515
"@types/node": "~18.19.39",

0 commit comments

Comments
 (0)