fix(core): module federation migration for project with no targets (#21536)

This commit is contained in:
Isaac Mann 2024-02-02 10:50:13 -05:00 committed by GitHub
parent 3ec71fa9d6
commit 7c231e34fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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' &&

View File

@ -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' &&