Skip to content

Commit

Permalink
fix(module-federation): host with no remotes should not build remote …
Browse files Browse the repository at this point in the history
…apps (nrwl#20283)
  • Loading branch information
Coly010 authored Nov 21, 2023
1 parent 82b39d1 commit 2354577
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function buildStaticRemotes(
context: import('@angular-devkit/architect').BuilderContext,
options: Schema
) {
if (!remotes.staticRemotes.length) {
return Promise.resolve();
}
const mappedLocationOfRemotes: Record<string, string> = {};
for (const app of remotes.staticRemotes) {
mappedLocationOfRemotes[app] = `http${options.ssl ? 's' : ''}://${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ async function buildStaticRemotes(
context: ExecutorContext,
options: ModuleFederationDevServerOptions
) {
if (!remotes.staticRemotes.length) {
return;
}
logger.info(`NX Building ${remotes.staticRemotes.length} static remotes...`);
const mappedLocationOfRemotes: Record<string, string> = {};

Expand Down

0 comments on commit 2354577

Please sign in to comment.