nx/docs/generated/packages/react/executors/module-federation-ssr-dev-server.json
Nicholas Cunningham ab162ebb54
feat(module-federation): Update SSR enabling static serving for remotes (#27345)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Currently, the default for remotes is to server them as development.
Which means a separate node process for each remote that is inside the
workspace.

This does not scale well and can lead to out of memory exceptions.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Remotes will start as static by default, which allows for better scaling
as the remotes increase.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

TODO
- [ ] Migrations
2024-08-14 09:14:58 -04:00

82 lines
2.8 KiB
JSON

{
"name": "module-federation-ssr-dev-server",
"implementation": "/packages/react/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts",
"schema": {
"version": 2,
"outputCapture": "direct-nodejs",
"title": "Module Federation SSR Dev Server",
"description": "Serve a SSR host application along with its known remotes.",
"cli": "nx",
"type": "object",
"properties": {
"browserTarget": {
"type": "string",
"description": "Target which builds the browser application.",
"x-priority": "important"
},
"serverTarget": {
"type": "string",
"description": "Target which builds the server application.",
"x-priority": "important"
},
"port": {
"type": "number",
"description": "The port to be set on `process.env.PORT` for use in the server.",
"default": 4200,
"x-priority": "important"
},
"devRemotes": {
"type": "array",
"items": { "type": "string" },
"description": "List of remote applications to run in development mode (i.e. using serve target).",
"x-priority": "important"
},
"skipRemotes": {
"type": "array",
"items": { "type": "string" },
"description": "List of remote applications to not automatically serve, either statically or in development mode.",
"x-priority": "important"
},
"host": {
"type": "string",
"description": "Host to listen on.",
"default": "localhost"
},
"staticRemotesPort": {
"type": "number",
"description": "The port at which to serve the file-server for the static remotes."
},
"pathToManifestFile": {
"type": "string",
"description": "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": {
"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."
},
"isInitialHost": {
"type": "boolean",
"description": "Whether the host that is running this executor is the first in the project tree to do so.",
"default": true,
"x-priority": "internal"
}
},
"required": ["browserTarget", "serverTarget"],
"presets": []
},
"description": "Serve a host application along with it's known remotes.",
"aliases": [],
"hidden": false,
"path": "/packages/react/src/executors/module-federation-ssr-dev-server/schema.json",
"type": "executor"
}