Skip to content

Commit

Permalink
fix(react): full support custom secure host for module federation (#2…
Browse files Browse the repository at this point in the history
…5288)

## Related Issue(s)

Fixes #
#21210

Co-authored-by: Vadim Goy <[email protected]>
(cherry picked from commit b9e190d)
  • Loading branch information
vadimka123 authored and FrozenPandaz committed May 28, 2024
1 parent c3ca5a0 commit 345a651
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down

0 comments on commit 345a651

Please sign in to comment.