Loading...
Loading...
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.
npx skill4agent add datahub-project/datahub-skills datahub-mfe-configure-app/mfe/<path>| Question | ID | Options |
|---|---|---|
| Are you configuring for local development or production/k8s? | | |
MFE app name — the | | |
URL path where the MFE should be accessible, e.g. | | |
| | |
Display label for navigation, e.g. | | |
| Should the MFE appear in the left nav sidebar? | | |
| Nav icon | | |
env_target| Question | ID | Options |
|---|---|---|
| How are you running DataHub locally? | | |
N/A - I'll fill it in latermf_namemfe_pathremote_entry_urldisplay_labelFinding the MFE app name: Open the MFE'sand look for thewebpack.config.jsblock. TheModuleFederationPluginproperty is what goes here:namejsnew ModuleFederationPlugin({ name: 'teamDashboardMFE', ... }) // ^^^^^^^^^^^^^^^^^ ← this valueIf the name in the YAML config doesn't match this exactly, the MFE will fail to load. If you used theskill, the name was printed in the summary as "Module Federation name".datahub-mfe-create-app
- 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____MFE_ID__//-/dashboarddashboarddatahub-dev.shMFE_CONFIG_FILE_PATH/datahub-frontend/conf/mfe.config.dev.yamldocker/datahub-frontend/Dockerfiledatahub-frontend/conf/mfe.config.dev.yamlmicroFrontends:subNavigationMode: false
microFrontends:
- id: ...
...scripts/dev/datahub-dev.sh rebuild --waitdatahub-frontend/run/frontend.envMFE_CONFIG_FILE_PATH../conf/mfe.config.local.yamldatahub-frontend/conf/mfe.config.local.yamlmicroFrontends:cd datahub-frontend/run && ./run-local-frontendSince you selected Production / Kubernetes, I won't edit any local config files — instead here's what you need.
MFE_PUBLIC_PATHWhen deploying your MFE to a CDN or static host, set theenv var during the MFE's production build so webpack knows the correct public URL for chunk loading.MFE_PUBLIC_PATHbashMFE_PUBLIC_PATH=https://cdn.example.com/my-mfe/ npm run build
__REMOTE_ENTRY_URL__http://localhost:9002/mfe__MFE_PATH__showInNav: true__DISPLAY_LABEL__env_targetMFE registered in DataHub:
Path: /mfe__MFE_PATH__
Remote entry: __REMOTE_ENTRY_URL__
Module: __MF_NAME__/mount
Nav sidebar: __SHOW_IN_NAV__ (icon: __NAV_ICON__)
Config file: datahub-frontend/conf/mfe.config.dev.yaml (Docker / datahub-dev.sh)
datahub-frontend/conf/mfe.config.local.yaml (Play server / IntelliJ)MFE registered in DataHub:
Path: /mfe__MFE_PATH__
Remote entry: __REMOTE_ENTRY_URL__
Module: __MF_NAME__/mount
Nav sidebar: __SHOW_IN_NAV__ (icon: __NAV_ICON__)
Config file: <your production config file>