mf-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Module Federation Docs Assistant

Module Federation 文档助手

Answer Module Federation questions by fetching only the relevant documentation pages — not the entire docs.
通过仅获取相关文档页面而非全部文档来解答Module Federation相关问题。

Steps

步骤

1. Fetch the documentation index

1. 获取文档索引

Fetch the index to discover available pages and their descriptions:
https://module-federation.io/llms.txt
The index is in this format:
undefined
获取索引以了解可用页面及其描述:
https://module-federation.io/llms.txt
索引格式如下:
undefined

Section Name

章节名称

  • Page Title: brief description of the page content
undefined
undefined

2. Identify the relevant page(s)

2. 识别相关页面

Read the page descriptions in the index and select the 1–3 pages most relevant to the user's question. Use the quick topic map below to narrow down candidates before reading descriptions.
Quick topic map:
User asks aboutLook in section
What is MF / concepts / glossary / getting started
Guide
start/
CLI, CSS isolation, type hints, data fetching, prefetch
Guide
basic/
Runtime API,
loadRemote
, MF instance, runtime hooks
Guide
runtime/
Build plugin setup for Webpack / Rspack / Rsbuild / Vite / Metro
Guide
build-plugins/
Next.js / Modern.js / Angular / React integration
Guide
framework/
or
Practice
frameworks/
React Bridge / Vue Bridge / cross-framework rendering
Practice
bridge/
name
,
filename
,
exposes
,
remotes
,
shared
,
dts
,
manifest
,
shareStrategy
Configuration
Runtime plugins, retry plugin, custom plugin
Plugins
Performance, tree shaking, shared scopes
Guide
performance/
or
Guide
advanced/
Debug mode, Chrome DevTool, global variables
Guide
debug/
Error messages, build errors, type errors
Guide
troubleshooting/
Monorepo, Nx
Practice
monorepos/
Deployment, Zephyr
Guide
deployment/
阅读索引中的页面描述,选择1-3个与用户问题最相关的页面。在阅读描述之前,可使用下方的快速主题图缩小候选范围。
快速主题图:
用户询问内容查找章节
什么是MF / 概念 / 术语表 / 入门
Guide
start/
CLI、CSS隔离、类型提示、数据获取、预加载
Guide
basic/
运行时API、
loadRemote
、MF实例、运行时钩子
Guide
runtime/
Webpack / Rspack / Rsbuild / Vite / Metro的构建插件配置
Guide
build-plugins/
Next.js / Modern.js / Angular / React集成
Guide
framework/
Practice
frameworks/
React Bridge / Vue Bridge / 跨框架渲染
Practice
bridge/
name
filename
exposes
remotes
shared
dts
manifest
shareStrategy
Configuration
运行时插件、重试插件、自定义插件
Plugins
性能、Tree Shaking、共享作用域
Guide
performance/
Guide
advanced/
调试模式、Chrome DevTool、全局变量
Guide
debug/
错误信息、构建错误、类型错误
Guide
troubleshooting/
单仓库(Monorepo)、Nx
Practice
monorepos/
部署、Zephyr
Guide
deployment/

3. Fetch the specific page(s)

3. 获取具体页面

Construct the URL by removing the
.md
extension from the path in the index, then prepend the base URL:
https://module-federation.io{path_without_md_extension}
Examples:
  • /guide/start/index.md
    https://module-federation.io/guide/start/index
  • /configure/shared.md
    https://module-federation.io/configure/shared
  • /guide/runtime/runtime-api.md
    https://module-federation.io/guide/runtime/runtime-api
Fetch the page(s) and read the content.
通过移除索引中路径的
.md
扩展名,再添加基础URL来构造完整URL:
https://module-federation.io{path_without_md_extension}
示例:
  • /guide/start/index.md
    https://module-federation.io/guide/start/index
  • /configure/shared.md
    https://module-federation.io/configure/shared
  • /guide/runtime/runtime-api.md
    https://module-federation.io/guide/runtime/runtime-api
获取页面并阅读内容。

4. Answer the question

4. 解答问题

Answer based on the fetched content. If the answer spans multiple pages (e.g., config + runtime), fetch both. Do not load more than 3 pages per question.
基于获取的内容解答问题。如果答案涉及多个页面(例如配置 + 运行时),则获取这两个页面。每个问题最多加载3个页面。

Important notes

重要说明

  • Always fetch the index first — never guess page paths from memory
  • If the index descriptions are insufficient to identify the right page, fetch the most likely candidate and check its content
  • The docs cover MF 2.0 (
    @module-federation/enhanced
    ) — this is different from the older Webpack 5 built-in Module Federation
  • Next.js support is deprecated; inform the user if they ask about it
  • 始终先获取索引——切勿凭记忆猜测页面路径
  • 如果索引描述不足以确定正确页面,获取最可能的候选页面并检查其内容
  • 文档覆盖MF 2.0(
    @module-federation/enhanced
    )——这与旧版Webpack 5内置的Module Federation不同
  • Next.js支持已弃用;如果用户询问相关内容,请告知用户