Skip to content

Commit

Permalink
fix(core): module federation migration for project with no targets
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacplmann committed Feb 2, 2024
1 parent a0ae902 commit 8ba10f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default async function (tree: Tree) {
function isWebpackBrowserUsed(tree: Tree) {
const projects = getProjects(tree);
for (const project of projects.values()) {
const targets = project.targets;
const targets = project.targets || {};
for (const [_, target] of Object.entries(targets)) {
if (
target.executor === '@nx/angular:webpack-browser' &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default async function (tree: Tree) {
function hasModuleFederationProject(tree: Tree) {
const projects = getProjects(tree);
for (const project of projects.values()) {
const targets = project.targets;
const targets = project.targets || {};
for (const [_, target] of Object.entries(targets)) {
if (
target.executor === '@nx/webpack:webpack' &&
Expand Down

0 comments on commit 8ba10f6

Please sign in to comment.