fix(react): full support custom secure host for module federation (#25288)

## Related Issue(s)

Fixes #
https://github.com/nrwl/nx/issues/21210

Co-authored-by: Vadim Goy <vadim.goy@zoominfo.com>
This commit is contained in:
Vadim Goy 2024-05-28 11:48:36 +03:00 committed by GitHub
parent 7f11a1d7d3
commit b9e190d22b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,19 +127,23 @@ async function startRemotes(
} => typeof r !== 'string' && r.remoteName === app
)?.configuration;
const defaultOverrides = {
...(options.host ? { host: options.host } : {}),
...(options.ssl ? { ssl: options.ssl } : {}),
...(options.sslCert ? { sslCert: options.sslCert } : {}),
...(options.sslKey ? { sslKey: options.sslKey } : {}),
};
const overrides =
target === 'serve'
? {
watch: true,
...(options.host ? { host: options.host } : {}),
...(options.ssl ? { ssl: options.ssl } : {}),
...(options.sslCert ? { sslCert: options.sslCert } : {}),
...(options.sslKey ? { sslKey: options.sslKey } : {}),
...(isUsingModuleFederationDevServerExecutor
? { isInitialHost: false }
: {}),
...defaultOverrides,
}
: {};
: { ...defaultOverrides };
remoteIters.push(
await runExecutor(
{