Skip to content

Commit 76ec2a9

Browse files
committed
fix(migrations): project browser entry instead of just main
1 parent 2b278ca commit 76ec2a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/migrations/common/UpdateChanges.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export class UpdateChanges {
682682
}
683683

684684
// attempt to find a main tsconfig from workspace:
685-
const wsProject = this.workspace.projects[0];
685+
const wsProject = Object.values(this.workspace.projects)[0];
686686
// technically could be per-project, but assuming there's at least one main tsconfig for IDE support
687687
const projectConfig = wsProject.architect?.build?.options['tsConfig'];
688688

@@ -847,8 +847,8 @@ export class UpdateChanges {
847847
for (const key of projectKeys) {
848848
const wsProject = this.workspace.projects[key];
849849
// intentionally compare against string values of the enum to avoid hard import
850-
if (wsProject.projectType == "application" && wsProject.architect?.build?.options['main']) {
851-
return wsProject.architect.build.options['main'];
850+
if (wsProject.projectType == "application" && wsProject.architect?.build?.options) {
851+
return wsProject.architect.build.options['browser'] || wsProject.architect.build.options['main'];
852852
} else if (wsProject.projectType == "library") {
853853
// TODO: attempt to resolve from project ng-package.json or tsConfig
854854
}

0 commit comments

Comments
 (0)