diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..c76768396c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fixed an issue preventing Angular apps using ng-deploy from being emulated or deployed. (#6584) diff --git a/src/frameworks/angular/utils.ts b/src/frameworks/angular/utils.ts index 70a381b2217..42b8639e6b4 100644 --- a/src/frameworks/angular/utils.ts +++ b/src/frameworks/angular/utils.ts @@ -220,7 +220,9 @@ export async function getContext(dir: string, targetOrConfiguration?: string) { } if (deployTarget) { - const options = await architectHost.getOptionsForTarget(deployTarget); + const options = await architectHost + .getOptionsForTarget(deployTarget) + .catch(() => workspaceProject.targets.get(deployTarget!.target)?.options); if (!options) throw new FirebaseError("Unable to get options for ng-deploy."); if (options.buildTarget) { assertIsString(options.buildTarget); @@ -238,6 +240,10 @@ export async function getContext(dir: string, targetOrConfiguration?: string) { assertIsString(options.serverTarget); serverTarget = targetFromTargetString(options.serverTarget); } + if (options.serveTarget) { + assertIsString(options.serveTarget); + serveTarget = targetFromTargetString(options.serveTarget); + } if (options.serveOptimizedImages) { serveOptimizedImages = true; }