MCPcopy Index your code
hub / github.com/angular-architects/module-federation-plugin

github.com/angular-architects/module-federation-plugin @21.2.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 21.2.5 ↗ · + Follow
601 symbols 1,430 edges 247 files 25 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@angular-architects/module-federation

[!WARNING] Native federation has moved!

This is our older deprecated v3 version. Starting Angular 22, we're moving to a new repository. For upgrading from v3 to v4, please have a look at our new repository.

Local Development

Playground App

You can test directly the libraries by using the playground application:

  1. Start the host application: shell npx nx run playground:serve
  2. Start the remote application: shell npx nx run mfe1:serve --port 3001

By using that approach you can test your modifications on the libraries.

Test Library on external repository

If you want to test the modifications directly on your application, you can follow the steps:

  1. Start the local registry Verdaccio: shell npx nx run local-registry
  2. Then you can publish the libraries by using:

  3. For Module federation: shell npm run publish-local:mf

  4. For Native federation:

shell npm run publish-local:nf

This will first build the libraries and publish them to http://localhost:4873

  1. Then just re-run the install on the other repo with you favorite package manager.

By default, the version from the package.json will be used. However, you can provide the version for a specific library by using:

npx nx run native-federation:publish-local -- --ver=17.0.8

Publish Libraries

Follow these steps to publish all libraries on npm:

  • For Module federation: shell npm run publish:mf
  • For Native federation: shell npm run publish:nf This will first build the libraries and publish them to npm registry.

By default, the version from the package.json will be used and the tag will be next. However, you can provide the version and the tag for a specific library by using:

npx nx run native-federation:publish -- --ver=17.0.8 --tag=latest

Extension points exported contracts — how you extend this code

BuildResult (Interface)
(no doc) [5 implementers]
libs/native-federation/src/utils/mem-resuts.ts
BuildResult (Interface)
(no doc) [3 implementers]
libs/native-federation-core/src/lib/core/build-adapter.ts
Chainable (Interface)
(no doc)
apps/playground-e2e/src/support/commands.ts
Chainable (Interface)
(no doc)
apps/mfe2-e2e/src/support/commands.ts
Chainable (Interface)
(no doc)
apps/mfe1-e2e/src/support/commands.ts
BootstrapOptions (Interface)
(no doc)
libs/mf-tools/src/lib/web-components/bootstrap-utils.ts
Library (Interface)
(no doc)
libs/mf/src/utils/shared-mappings.ts
BuildNotificationOptions (Interface)
(no doc)
libs/native-federation-runtime/src/lib/model/build-notifications-options.ts

Core symbols most depended-on inside this repo

initFederation
called by 44
libs/native-federation-runtime/src/lib/init-federation.ts
get
called by 44
libs/native-federation/src/utils/mem-resuts.ts
createRemoteInfo
called by 29
libs/native-federation-runtime/src/lib/__test-helpers__/federation-fixtures.ts
createRemoteConfig
called by 29
libs/native-federation-runtime/src/lib/__test-helpers__/federation-fixtures.ts
createFederationInfo
called by 25
libs/native-federation-runtime/src/lib/__test-helpers__/federation-fixtures.ts
hostRemoteEntryHandler
called by 24
libs/native-federation-runtime/src/lib/__test-helpers__/msw-handlers.ts
loadRemoteModule
called by 20
libs/native-federation-runtime/src/lib/load-remote-module.ts
createHostInfo
called by 20
libs/native-federation-runtime/src/lib/__test-helpers__/federation-fixtures.ts

Shape

Function 442
Class 58
Interface 56
Method 44
Enum 1

Languages

TypeScript100%

Modules by API surface

libs/native-federation-node/src/lib/utils/fstart.mjs32 symbols
libs/native-federation/src/utils/mem-resuts.ts19 symbols
libs/mf/src/schematics/init-webpack/schematic.ts18 symbols
libs/native-federation-runtime/src/lib/__test-helpers__/module-fixtures.ts17 symbols
libs/native-federation-core/src/lib/config/share-utils.ts17 symbols
libs/native-federation/src/schematics/init/schematic.ts15 symbols
libs/native-federation-core/src/lib/utils/package-info.ts15 symbols
libs/mf-tools/src/lib/web-components/bootstrap-utils.ts15 symbols
libs/mf/src/schematics/init-rspack/schematic.ts13 symbols
libs/native-federation/src/utils/angular-esbuild-adapter.ts12 symbols
libs/native-federation-node/src/lib/utils/import-map-loader.js12 symbols
libs/mf/src/utils/share-utils.ts12 symbols

For agents

$ claude mcp add module-federation-plugin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact