fix(core): module federation migration for project with no targets (#21536)
This commit is contained in:
parent
3ec71fa9d6
commit
7c231e34fb
@ -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' &&
|
||||
|
||||
@ -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' &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user