Skip to content

Commit

Permalink
fix(angular): throw error for invalid project name in withModuleFeder…
Browse files Browse the repository at this point in the history
…ation helper (#15694)

(cherry picked from commit 76ec6f9)
  • Loading branch information
leosvelperez authored and FrozenPandaz committed Mar 15, 2023
1 parent 996a690 commit 932ed44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/angular/src/utils/mf/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export async function getModuleFederationConfig(
projectGraph = await createProjectGraphAsync();
}

if (!projectGraph.nodes[mfConfig.name]?.data) {
throw Error(
`Cannot find project "${mfConfig.name}". Check that the name is correct in module-federation.config.js`
);
}

const dependencies = getDependentPackagesForProject(
projectGraph,
mfConfig.name
Expand Down

0 comments on commit 932ed44

Please sign in to comment.