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
  • Loading branch information
leosvelperez committed Mar 15, 2023
1 parent 2e88414 commit c7042f1
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 c7042f1

Please sign in to comment.