static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

swa init does not detect Angular application-builder output directory

Open adrianhall opened this issue 1 year ago • 1 comments

Describe the bug

I have an Angular v18 app created with:

npx ng new app-name

Running swa init --yes sets the outputLocation to "dist\app-name". The "angular.json" show projects > app-name > architect > build > options > outputPath is dist/app-name (so it's technically correct)

A recent change in the Angular system now places the files in dist/app-name/browser. This location is configurable. This is explicitly the case when the default builder (@angular-devkit/build-angular:application) is used. See https://github.com/angular/angular-cli/issues/26304 for a discussion of the problem.

To Reproduce Steps to reproduce the behavior:

ng new app-name
cd app-name
swa init --yes

Expected behavior

The SWA CLI should properly detect the output path based on the angular.json settings.

adrianhall avatar May 30 '24 23:05 adrianhall

We are going to put all the framework detection code into its own library for re-use (since that was where it came from!) This task will be moved over there and will be incorporated as part of the move to that library. Moving out of this release to accomodate that plan of action.

adrianhall avatar Jul 22 '24 14:07 adrianhall