fix(react): fix target to use for serve-ssr remote detection (#13709)
This commit is contained in:
parent
3e933b6e24
commit
62fc986609
@ -4,11 +4,11 @@ import { getModuleFederationConfig } from './utils';
|
|||||||
|
|
||||||
function determineRemoteUrl(remote: string) {
|
function determineRemoteUrl(remote: string) {
|
||||||
const remoteConfiguration = readCachedProjectConfiguration(remote);
|
const remoteConfiguration = readCachedProjectConfiguration(remote);
|
||||||
const serveTarget = remoteConfiguration?.targets?.serve;
|
const serveTarget = remoteConfiguration?.targets?.['serve-server'];
|
||||||
|
|
||||||
if (!serveTarget) {
|
if (!serveTarget) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cannot automatically determine URL of remote (${remote}). Looked for property "host" in the project's "serve" target.\n
|
`Cannot automatically determine URL of remote (${remote}). Looked for property "host" in the project's "serve-server" target.\n
|
||||||
You can also use the tuple syntax in your webpack config to configure your remotes. e.g. \`remotes: [['remote1', '//localhost:4201']]\``
|
You can also use the tuple syntax in your webpack config to configure your remotes. e.g. \`remotes: [['remote1', '//localhost:4201']]\``
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user