## Current Behavior Our Module Federation support across Angular and React contains Host and Remote generators. The module-federation.io docs have started to shift towards Consumer and Producer terminology for better translation of meanings across languages. ## Expected Behavior To stay consistent with official terminology, add aliases for the host and remote generators to allow for the new terminology. i.e. host -> consumer, remote -> producer. Therefore the following are all valid ```shell nx g host shell --remotes=remote1 nx g host shell --producers=producer1 nx g consumer shell --remotes=remote1 nx g consumer shell --producers=remote1 nx g remote remote1 --host=shell nx g remote remote1 --consumer=shell nx g producer producer1 --host=shell nx g producer producer1 --consumer=shell ```
105 lines
3.9 KiB
JSON
105 lines
3.9 KiB
JSON
{
|
|
"name": "module-federation-dev-server",
|
|
"implementation": "/packages/rspack/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts",
|
|
"schema": {
|
|
"version": 2,
|
|
"outputCapture": "direct-nodejs",
|
|
"title": "Rspack Module Federation Dev Server",
|
|
"description": "Serve a module federation application.",
|
|
"cli": "nx",
|
|
"type": "object",
|
|
"properties": {
|
|
"devRemotes": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{ "type": "string" },
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"remoteName": { "type": "string" },
|
|
"configuration": { "type": "string" }
|
|
},
|
|
"required": ["remoteName"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"description": "List of Producer (remote) applications to run in development mode (i.e. using serve target).",
|
|
"x-priority": "important",
|
|
"alias": "devProducers"
|
|
},
|
|
"skipRemotes": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "List of Producer (remote) applications to not automatically serve, either statically or in development mode. This will not remove the Producers (remotes) from the `module-federation.config` file, and therefore the application may still try to fetch these Producers (remotes).\nThis option is useful if you have other means for serving the Producer (remote) application(s).\n**NOTE:** Producers (remotes) that are not in the workspace will be skipped automatically.",
|
|
"x-priority": "important",
|
|
"alias": "skipProducers"
|
|
},
|
|
"buildTarget": {
|
|
"type": "string",
|
|
"description": "Target which builds the application.",
|
|
"x-priority": "important"
|
|
},
|
|
"port": {
|
|
"type": "number",
|
|
"description": "Port to listen on.",
|
|
"default": 4200,
|
|
"x-priority": "important"
|
|
},
|
|
"host": {
|
|
"type": "string",
|
|
"description": "Host to listen on.",
|
|
"default": "localhost"
|
|
},
|
|
"ssl": {
|
|
"type": "boolean",
|
|
"description": "Serve using `HTTPS`.",
|
|
"default": false
|
|
},
|
|
"sslKey": {
|
|
"type": "string",
|
|
"description": "SSL key to use for serving `HTTPS`."
|
|
},
|
|
"sslCert": {
|
|
"type": "string",
|
|
"description": "SSL certificate to use for serving `HTTPS`."
|
|
},
|
|
"publicHost": {
|
|
"type": "string",
|
|
"description": "Public URL where the application will be served."
|
|
},
|
|
"static": {
|
|
"type": "boolean",
|
|
"description": "Whether to use a static file server instead of the rspack-dev-server. This should be used for Producer (remote) applications that are also Consumer (host) applications."
|
|
},
|
|
"isInitialHost": {
|
|
"type": "boolean",
|
|
"description": "Whether the Consumer (host) that is running this executor is the first in the project tree to do so.",
|
|
"default": true,
|
|
"x-priority": "internal",
|
|
"alias": "isInitialConsumer"
|
|
},
|
|
"parallel": {
|
|
"type": "number",
|
|
"description": "Max number of parallel processes for building static Producers (remotes)."
|
|
},
|
|
"staticRemotesPort": {
|
|
"type": "number",
|
|
"description": "The port at which to serve the file-server for the static Producers (remotes).",
|
|
"alias": "staticProducersPort"
|
|
},
|
|
"pathToManifestFile": {
|
|
"type": "string",
|
|
"description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic Producer (remote) applications relative to the workspace root."
|
|
}
|
|
},
|
|
"presets": []
|
|
},
|
|
"description": "Serve a host or remote application.",
|
|
"aliases": [],
|
|
"hidden": false,
|
|
"path": "/packages/rspack/src/executors/module-federation-dev-server/schema.json",
|
|
"type": "executor"
|
|
}
|