A new generated angular-project with angular-cli 17 cannot automatically updated with ng add ngx-build-plus.
It is reproducible with following commands:
# create an angular project with an dummy-app project
npx -p @angular/cli@17 ng new dummy-spa --create-application=false --skip-git --ssr=false
cd dummy-spa
npm run ng -- generate application dummy-app --style=scss --minimal --routing=false --ssr=false
# install ngx-build-plus and patch the dummy-app project
npm install ngx-build-plus@17 --save-dev
npm run ng -- add ngx-build-plus --project=dummy-app --skip-confirmation
Now run npm run build returns the Error Data path "" must have required property 'main'
Details & manual fix:
Angular 17 uses the "builder": "@angular-devkit/build-angular:application" now.
Which will be replaced with ngx-build-plus: "builder": "ngx-build-plus:browser",
The "@angular-devkit/build-angular:application" uses the "browse" property instead of the "main" property
"ngx-build-plus:browser" only supports the "main" property
Possible Solution
I think "ngx-build-plus:application" has to be implemented and used instead of "ngx-build-plus:browser"?
Problem:
A new generated angular-project with angular-cli 17 cannot automatically updated with
ng add ngx-build-plus
.It is reproducible with following commands:
Now run
npm run build
returns the ErrorData path "" must have required property 'main'
Details & manual fix:
Angular 17 uses the "builder": "@angular-devkit/build-angular:application" now. Which will be replaced with ngx-build-plus: "builder": "ngx-build-plus:browser", The "@angular-devkit/build-angular:application" uses the "browse" property instead of the "main" property "ngx-build-plus:browser" only supports the "main" property
Possible Solution
I think "ngx-build-plus:application" has to be implemented and used instead of "ngx-build-plus:browser"?