mf-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseModule 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.txtThe index is in this format:
undefined获取索引以了解可用页面及其描述:
https://module-federation.io/llms.txt索引格式如下:
undefinedSection Name
章节名称
- Page Title: brief description of the page content
undefined- 页面标题: 页面内容的简要描述
undefined2. 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 about | Look in section |
|---|---|
| What is MF / concepts / glossary / getting started | |
| CLI, CSS isolation, type hints, data fetching, prefetch | |
Runtime API, | |
| Build plugin setup for Webpack / Rspack / Rsbuild / Vite / Metro | |
| Next.js / Modern.js / Angular / React integration | |
| React Bridge / Vue Bridge / cross-framework rendering | |
| |
| Runtime plugins, retry plugin, custom plugin | |
| Performance, tree shaking, shared scopes | |
| Debug mode, Chrome DevTool, global variables | |
| Error messages, build errors, type errors | |
| Monorepo, Nx | |
| Deployment, Zephyr | |
阅读索引中的页面描述,选择1-3个与用户问题最相关的页面。在阅读描述之前,可使用下方的快速主题图缩小候选范围。
快速主题图:
| 用户询问内容 | 查找章节 |
|---|---|
| 什么是MF / 概念 / 术语表 / 入门 | |
| CLI、CSS隔离、类型提示、数据获取、预加载 | |
运行时API、 | |
| Webpack / Rspack / Rsbuild / Vite / Metro的构建插件配置 | |
| Next.js / Modern.js / Angular / React集成 | |
| React Bridge / Vue Bridge / 跨框架渲染 | |
| |
| 运行时插件、重试插件、自定义插件 | |
| 性能、Tree Shaking、共享作用域 | |
| 调试模式、Chrome DevTool、全局变量 | |
| 错误信息、构建错误、类型错误 | |
| 单仓库(Monorepo)、Nx | |
| 部署、Zephyr | |
3. Fetch the specific page(s)
3. 获取具体页面
Construct the URL by removing the extension from the path in the index, then prepend the base URL:
.mdhttps://module-federation.io{path_without_md_extension}Examples:
- →
/guide/start/index.mdhttps://module-federation.io/guide/start/index - →
/configure/shared.mdhttps://module-federation.io/configure/shared - →
/guide/runtime/runtime-api.mdhttps://module-federation.io/guide/runtime/runtime-api
Fetch the page(s) and read the content.
通过移除索引中路径的扩展名,再添加基础URL来构造完整URL:
.mdhttps://module-federation.io{path_without_md_extension}示例:
- →
/guide/start/index.mdhttps://module-federation.io/guide/start/index - →
/configure/shared.mdhttps://module-federation.io/configure/shared - →
/guide/runtime/runtime-api.mdhttps://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 () — this is different from the older Webpack 5 built-in Module Federation
@module-federation/enhanced - Next.js support is deprecated; inform the user if they ask about it
- 始终先获取索引——切勿凭记忆猜测页面路径
- 如果索引描述不足以确定正确页面,获取最可能的候选页面并检查其内容
- 文档覆盖MF 2.0()——这与旧版Webpack 5内置的Module Federation不同
@module-federation/enhanced - Next.js支持已弃用;如果用户询问相关内容,请告知用户