Skip to content

Commit 3727b3e

Browse files
zllkjcclaude
andauthored
docs: refresh docs and unify internal links (#4817)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5776688 commit 3727b3e

162 files changed

Lines changed: 4622 additions & 4548 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/docs-improve.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'website-new': patch
3+
'@module-federation/rspress-plugin': patch
4+
---
5+
6+
docs: improve guides, configuration, and integrations content
7+
8+
- Unify internal links to absolute `/path/to/page.html` form (drop relative paths and `/zh` / `/en` prefixes).
9+
- Restructure configuration option pages for consistent formatting.
10+
- Refresh integration guides for Modern.js, Next.js, Angular, Vue, and React.
11+
- Reorganize runtime API and hooks reference, and rewrite advanced/start/data guides.
12+
- Sync all updates between EN and ZH locales.
13+
- Bump `@rspress/shared` runtime dep and `@rspress/core` peer to `2.0.14`.

apps/website-new/docs/en/ai/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar: false
66
# AI Quick Start
77

88
:::tip Prefer to read the docs yourself?
9-
If you want to go through Module Federation concepts, configuration, and integration in order, head to the [Getting Started guide](../guide/start/index).
9+
If you want to go through Module Federation concepts, configuration, and integration in order, head to the [Getting Started guide](/guide/start/index.html).
1010
:::
1111

1212
## A Better Way To Start
@@ -48,12 +48,12 @@ The `mf` skill does more than answer questions. It can also help your agent:
4848
- inspect remote module information
4949
- read observability reports and debug MF loading failures
5050

51-
👉 [View Agent Skills documentation](./skill)
51+
👉 [View Agent Skills documentation](/ai/skill.html)
5252

5353
## Observe and Debug MF Loading
5454

5555
If you want an AI coding agent to debug Module Federation loading with concrete
56-
runtime facts, enable the [Observability Plugin](../plugin/plugins/observability-plugin)
56+
runtime facts, enable the [Observability Plugin](/plugin/plugins/observability-plugin.html)
5757
first.
5858

5959
After a loading failure, the browser console will print a `traceId` and,
@@ -112,6 +112,6 @@ If you want to start using this workflow right away:
112112

113113
1. Install `mf`
114114
2. Ask the question you care about most
115-
3. Enable the [Observability Plugin](../plugin/plugins/observability-plugin) when
115+
3. Enable the [Observability Plugin](/plugin/plugins/observability-plugin.html) when
116116
you need MF loading observability
117-
4. Open [Skills documentation](./skill) to see which sub-commands it supports
117+
4. Open [Skills documentation](/ai/skill.html) to see which sub-commands it supports

apps/website-new/docs/en/ai/skill.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Module Federation now exposes one unified **`mf` skill**.
99

1010
You do not need to pick from a long list of separate skills, and you do not need to read the docs first and then translate them back to your agent. The simpler approach is to install this one skill and let the agent decide whether it should read docs, inspect config, or troubleshoot a problem.
1111

12-
If you have not read it yet, start with [AI Quick Start](./index).
12+
If you have not read it yet, start with [AI Quick Start](/ai/index.html).
1313

1414
## Installation
1515

@@ -106,7 +106,7 @@ At that point, the goal is not for you to manually investigate first. The goal i
106106

107107
### 4. Let the agent read MF observability
108108

109-
For full loading observability, install the [Observability Plugin](../plugin/plugins/observability-plugin)
109+
For full loading observability, install the [Observability Plugin](/plugin/plugins/observability-plugin.html)
110110
in your app. When a browser console error prints a `traceId` and `read:`
111111
command, pass it to the skill:
112112

apps/website-new/docs/en/blog/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ sidebar: false
66

77
Find the latest posts and release announcements about Module Federation here.
88

9-
## [Module Federation 2.0 Stable Release](./v2-stable-version)
9+
## [Module Federation 2.0 Stable Release](/blog/v2-stable-version.html)
1010

1111
> February 10, 2026
1212
1313
Module Federation 2.0 is officially stable, bringing shared dependency tree shaking and a Modern.js v3 plugin to make integration easier.
1414

15-
## [Module Federation on Node.js: From Usable to Ergonomic](./node)
15+
## [Module Federation on Node.js: From Usable to Ergonomic](/blog/node.html)
1616

1717
> January 23, 2026
1818
1919
Learn how to use Module Federation in Node.js, including runtime-only consumption, Rspack/Webpack integration, and producer-side build configuration.
2020

21-
## [Handling Remote Module Rendering Errors](./error-load-remote)
21+
## [Handling Remote Module Rendering Errors](/blog/error-load-remote.html)
2222

2323
> September 9, 2025
2424
2525
Fallback strategies for remote module load/render failures: network retries, the errorLoadRemote hook, and React ErrorBoundary.
2626

27-
## [Release Announcement](./announcement)
27+
## [Release Announcement](/blog/announcement.html)
2828

2929
> April 26, 2024
3030

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

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface PluginDtsOptions {
1818
}
1919
```
2020

21-
### generateTypes
21+
## generateTypes
2222

2323
- Type: `boolean | DtsRemoteOptions`
2424
- Required: No
@@ -67,52 +67,52 @@ When configuring `generateTypes` to `true`, the following configuration will be
6767
}
6868
```
6969

70-
#### extractRemoteTypes
70+
### extractRemoteTypes
7171

7272
- Type: `boolean`
7373
- Required: No
7474
- Default value: `undefined`
7575
- Usage scenario: When the content of the producer `exposes` has its own `remotes` module that re-exports itself, then `extractRemoteTypes: true` can ensure that the consumer can normally obtain the module type of the producer `exposes`
76-
- Example: [Nested type re-export](../guide/basic/type-prompt#Nested type re-export)
76+
- Example: [Nested type re-export](/guide/basic/type-prompt.html#nested-type-re-export)
7777

7878
Whether to extract the type of `remotes`.
7979

80-
#### extractThirdParty
80+
### extractThirdParty
8181

8282
- Type: `boolean`
8383
- Required: No
8484
- Default value: `undefined`
8585
- Usage scenario: When the content of the producer `exposes` contains a module containing `antd`, and the consumer does not have `antd` installed, then `extractThirdParty: true` can ensure that the consumer can normally obtain the module of the producer `exposes` type
86-
- Example: [Third-party package type extraction](../guide/basic/type-prompt#Third-party package type extraction)
86+
- Example: [Third-party package type extraction](/guide/basic/type-prompt.html#third-party-package-type-extraction)
8787

8888
Whether to extract third-party package types.
8989

90-
#### generateAPITypes
90+
### generateAPITypes
9191

9292
- Type: `boolean`
9393
- Required: No
9494
- Default value: `undefined`
95-
- Example: [Federation Runtime API type prompt](../guide/basic/type-prompt#federation-runtime-api-type-prompt)
95+
- Example: [Federation Runtime API type prompt](/guide/basic/type-prompt.html#federation-runtime-api-type-prompt)
9696

9797
Whether to generate the `loadRemote` type in `Federation Runtime`
9898

99-
#### compileInChildProcess
99+
### compileInChildProcess
100100

101101
- Type: `boolean`
102102
- Required: No
103103
- Default value: `undefined`
104104

105105
Whether generate types in child process
106106

107-
#### abortOnError
107+
### abortOnError
108108

109109
- Type: `boolean`
110110
- Required: No
111111
- Default value: `false`
112112

113113
Whether to throw an error when a problem is encountered during type generation
114114

115-
#### afterGenerate
115+
### afterGenerate
116116

117117
- Type: `(options: DtsGenerateTypesHookOptions) => Promise<void> | void`
118118
- Required: No
@@ -133,15 +133,15 @@ new ModuleFederationPlugin({
133133
});
134134
```
135135

136-
#### tsConfigPath
136+
### tsConfigPath
137137

138138
- Type: `string`
139139
- Required: No
140140
- Default value: `path.join(process.cwd(),'./tsconfig.json')`
141141
> priority: dts.generateTypes.tsConfigPath > dts.tsConfigPath
142142
tsconfig configuration file path
143143

144-
#### outputDir
144+
### outputDir
145145

146146
- Type: `string`
147147
- Required: No
@@ -174,39 +174,39 @@ With the config above, the generated files are emitted to
174174
`dist/react/production/@mf-types.zip` and
175175
`dist/react/production/@mf-types.d.ts`.
176176

177-
#### typesFolder
177+
### typesFolder
178178

179179
- Type: `string`
180180
- Required: No
181181
- Default value: `'@mf-types'`
182182

183183
The name of the generated compression type file. For example, if typesFolder is set to `custom`, then the name of the generated compression type file is: `custom.zip`
184184

185-
#### deleteTypesFolder
185+
### deleteTypesFolder
186186

187187
- Type: `boolean`
188188
- Required: No
189189
-Default: `true`
190190

191191
Whether to delete the generated type folder
192192

193-
#### compilerInstance
193+
### compilerInstance
194194

195195
- Type: `'tsc' | 'tsgo' | 'vue-tsc' | 'tspc' | string`
196196
- Required: No
197197
- Default value: `'tsc'`
198198

199199
Instance of compiled type
200200

201-
#### deleteTsConfig
201+
### deleteTsConfig
202202

203203
- Type: `boolean`
204204
- Required: No
205205
- Default value: `true`
206206

207207
Whether to delete the temporary tsconfig configuration file.
208208

209-
### consumeTypes
209+
## consumeTypes
210210

211211
- Type: `boolean | DtsHostOptions`
212212
- Required: No
@@ -236,56 +236,56 @@ When configuring `consumeTypes` to `true`, the following configuration will be g
236236
}
237237
```
238238

239-
#### consumeAPITypes
239+
### consumeAPITypes
240240

241241
- Type: `boolean`
242242
- Required: No
243243
- Default value: `true`
244-
- Example: [Federation Runtime API type prompt](../guide/basic/type-prompt#federation-runtime-api-type-prompt)
244+
- Example: [Federation Runtime API type prompt](/guide/basic/type-prompt.html#federation-runtime-api-type-prompt)
245245

246246
Whether to generate the type of runtime `loadRemote` API
247247

248-
#### maxRetries
248+
### maxRetries
249249

250250
- Type: `number`
251251
- Required: No
252252
- Default value: `3`
253253

254254
Maximum number of retries for failed loading
255255

256-
#### abortOnError
256+
### abortOnError
257257

258258
- Type: `boolean`
259259
- Required: No
260260
- Default value: `false`
261261

262262
Whether to throw an error when a problem is encountered during type loading
263263

264-
#### typesFolder
264+
### typesFolder
265265

266266
- Type: `string`
267267
- Required: No
268268
- Default value: `'@mf-types'`
269269

270270
Type storage directory after successful loading
271271

272-
#### deleteTypesFolder
272+
### deleteTypesFolder
273273

274274
- Type: `boolean`
275275
- Required: No
276276
- Default value: `true`
277277

278278
Before loading type files, whether to delete the previously loaded `typesFolder` directory
279279

280-
#### remoteTypesFolder
280+
### remoteTypesFolder
281281

282282
- Type: `string`
283283
- Required: No
284284
- Default value: `'@mf-types'`
285285

286286
`typesFolder` corresponding to `remotes` directory configuration
287287

288-
#### remoteTypeUrls
288+
### remoteTypeUrls
289289

290290
- Type: `(() => Promise<RemoteTypeUrls>) | RemoteTypeUrls`
291291
- Required: No
@@ -354,38 +354,38 @@ export default createModuleFederationConfig({
354354
});
355355
```
356356

357-
#### family
357+
### family
358358

359359
- Type: `0 | 4 | 6`
360360
- Required: No
361-
- Default value: 0
361+
- Default value: `0`
362362

363363
Configure the IP version family that will be used for network operations.
364364

365-
#### typesOnBuild
365+
### typesOnBuild
366366
- Type: `boolean`
367367
- Required: No
368368
- Default: `false`
369369

370370
By default, Module Federation does not load type files in production ( process.env.NODE_ENV === 'production' ). To enable type loading in production builds, set typesOnBuild to true .
371371

372-
### tsConfigPath
372+
## tsConfigPath
373373

374374
- Type: `string`
375375
- Required: No
376376
- Default value: `path.join(process.cwd(),'./tsconfig.json')`
377377

378378
tsconfig configuration file path
379379

380-
### cwd
380+
## cwd
381381

382382
- Type: `string`
383383
- Required: No
384384
- Default value: `undefined`
385385

386386
The working directory to run the compiler
387387

388-
### displayErrorInTerminal
388+
## displayErrorInTerminal
389389

390390
- Type: `boolean`
391391
- Required: No

0 commit comments

Comments
 (0)