Skip to content

Commit

Permalink
fix(react): full support custom secure host for module federation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Goy committed May 23, 2024
1 parent 261b0ff commit 1fcbe6b
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,21 @@ 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 }
: {}),
}
: {};
watch: true,
...(isUsingModuleFederationDevServerExecutor ? { isInitialHost: false } : {}),
...defaultOverrides,
}
: { ...defaultOverrides };

remoteIters.push(
await runExecutor(
{
Expand Down

0 comments on commit 1fcbe6b

Please sign in to comment.