跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

datahub-mfe-configure-app

Configure a DataHub instance to load and display a Micro Frontend (MFE) app. Use when the user wants to register an MFE with DataHub, add an MFE to the nav sidebar, set up MFE config for local dev or production/k8s, or troubleshoot MFE loading issues.

datahub-project · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add datahub-project/datahub-skills --skill datahub-mfe-configure-app

技能说明


name: datahub-mfe-configure-app description: >- Configure a DataHub instance to load and display a Micro Frontend (MFE) app. Use when the user wants to register an MFE with DataHub, add an MFE to the nav sidebar, set up MFE config for local dev or production/k8s, or troubleshoot MFE loading issues.

Configure an MFE in DataHub

Walks through registering a Micro Frontend app with the DataHub frontend so it loads at /mfe/<path> and optionally appears in the navigation sidebar. Covers local development, production/k8s deployment, and troubleshooting.

Step 1: Gather Information

Use the AskQuestion tool to collect the following in a single call.

QuestionIDOptions
Are you configuring for local development or production/k8s?env_targetLocal development / Production / Kubernetes
MFE app name — the name field inside new ModuleFederationPlugin({ name: '...' }) in the MFE's webpack.config.js. Must match exactly.mf_nametestAppMFE / N/A - I'll fill it in later
URL path where the MFE should be accessible, e.g. /dashboard (must start with /)mfe_path/test_page / N/A - I'll fill it in later
remoteEntry.js URL, e.g. http://localhost:3002/remoteEntry.jsremote_entry_urlhttp://localhost:3002/remoteEntry.js / N/A - I'll fill it in later
Display label for navigation, e.g. Team Dashboarddisplay_labelTest Dashboard / N/A - I'll fill it in later
Should the MFE appear in the left nav sidebar?show_in_navYes / No
Nav iconnav_iconChartBar / Trophy / Gear / HandWaving / Lightning / MagnifyingGlass / Database / Users / Shield / Bell / Flag / Star / Heart / Cube / Table / Code / Globe / Rocket

If env_target is Local development, ask one follow-up question using AskQuestion before proceeding:

QuestionIDOptions
How are you running DataHub locally?local_modeDocker / datahub-dev.sh (standard) / Play server directly (sbt / IntelliJ)

For the N/A - I'll fill it in later fields (mf_name, mfe_path, remote_entry_url, display_label), do NOT invent or suggest values from the workspace. The user will type their own.

Finding the MFE app name: Open the MFE's webpack.config.js and look for the ModuleFederationPlugin block. The name property is what goes here:

new ModuleFederationPlugin({ name: 'teamDashboardMFE', ... })
//                                   ^^^^^^^^^^^^^^^^^  ← this value

If the name in the YAML config doesn't match this exactly, the MFE will fail to load. If you used the datahub-mfe-create-app skill, the name was printed in the summary as "Module Federation name".

Step 2: Generate the YAML Config Entry

Build the config entry from the gathered values:

- id: __MFE_ID__
  label: __DISPLAY_LABEL__
  path: __MFE_PATH__
  remoteEntry: __REMOTE_ENTRY_URL__
  module: __MF_NAME__/mount
  flags:
    enabled: true
    showInNav: __SHOW_IN_NAV__
  navIcon: __NAV_ICON__

Where __MFE_ID__ is derived from the path (strip leading /, replace / with -), e.g. path /dashboard becomes id dashboard.

Step 3: Apply the Configuration

Local Development — Docker / datahub-dev.sh (standard)

The Docker image has MFE_CONFIG_FILE_PATH baked in at build time pointing to /datahub-frontend/conf/mfe.config.dev.yaml (set in docker/datahub-frontend/Dockerfile). **This is the file to edit for any Docke

阅读完整来源 ↗