@nx/react:federate-module
Create a federated module, which can be loaded by a remote host.
Create a federated module, which can be loaded by a remote host.
1nx generate federate-module ...
2
By default, Nx will search for federate-module
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/react:federate-module ...
2
Show what will be generated without writing to disk:
1nx g federate-module ... --dry-run
2
Create a federated module from my-remote-app, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule.:
1nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=my-remote-app --remoteDirectory=apps/my-remote-app
2
^[a-zA-Z][^:]*$
The name of the module.
The path to locate the federated module. This path should be relative to the workspace root and the file should exist.
The name of the remote.
rspack
rspack
, webpack
The bundler to use.
cypress
cypress
, playwright
, none
Test runner to use for end to end (E2E) tests.
The host / shell application for this remote.
eslint
eslint
The tool to use for running lint checks.
The directory of the new remote application if one needs to be created.
none
The file extension to be used for style files.
jest
jest
, none
Test runner to use for unit tests.
false
Skip formatting files.
Watch the replays of exciting talks on developer tooling and monorepos! Catch all the insightful presentations from the event on our YouTube channel.