@nx/rspack:module-federation-dev-server

Serve a module federation application.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

Options

buildTarget

string

Target which builds the application.

devRemotes

Array<oneOf [string, object ]>

List of remote applications to run in development mode (i.e. using serve target).

port

number
Default: 4200

Port to listen on.

skipRemotes

Array<string>

List of remote applications to not automatically serve, either statically or in development mode. This will not remove the remotes from the module-federation.config file, and therefore the application may still try to fetch these remotes. This option is useful if you have other means for serving the remote application(s). NOTE: Remotes that are not in the workspace will be skipped automatically.

host

string
Default: localhost

Host to listen on.

publicHost

string

Public URL where the application will be served.

parallel

number

Max number of parallel processes for building static remotes

pathToManifestFile

string

Path to a Module Federation manifest file (e.g. my/path/to/module-federation.manifest.json) containing the dynamic remote applications relative to the workspace root.

ssl

boolean
Default: false

Serve using HTTPS.

sslKey

string

SSL key to use for serving HTTPS.

sslCert

string

SSL certificate to use for serving HTTPS.

static

boolean

Whether to use a static file server instead of the rspack-dev-server. This should be used for remote applications that are also host applications.

staticRemotesPort

number

The port at which to serve the file-server for the static remotes.

isInitialHost

Internal
boolean
Default: true

Whether the host that is running this executor is the first in the project tree to do so.