Module Federation Expose
Developmentmodule-federation-exposeModule Federation Expose is an Agent Skill for development published in the erxes/erxes repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add or change erxes frontend Module Federation exposes, shared dependencies, widgets, and host-facing plugin entry points.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/erxes/erxes/blob/HEAD/.agents/skills/module-federation-expose/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/module-federation-expose, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Module Federation Expose
Workflow
- Open the plugin's
module-federation.config.tsand identify current exposes and shared dependencies. - Confirm whether the new surface should be a route module, config, widget, relation widget, settings page, or plugin-local component.
- Add exposes only when the module must be loaded by the host or another Module Federation boundary.
- Keep exposed entry points stable and small. Put feature internals under
src/modules,src/pages, or plugin-local shared folders. - Update host references, plugin config, route registration, or widget config when an expose name or path changes.
- Keep shared dependency behavior consistent with nearby plugin configs.
- Run
pnpm nx build <plugin>andpnpm nx lint <plugin>for frontend plugin changes.
Important
- Do not move or rename exposes without updating all host references.
- Do not put general feature UI in
src/widgets; reserve it for widget exports and widget-specific UI. - Do not add shared plugin UI to
frontend/core-ui; move truly shared frontend UI toerxes-uiorui-modulesonly when reuse is clear. - Avoid adding dependencies for an expose unless the existing repo cannot reasonably cover the need.