Closed ktsangop closed 1 year ago
For what it's worth, this seems to have been fixed in version 15.0.0
of the plugin.
I have created a new branch on the reproduce repo with upgraded packages to Angular 15:
https://gitlab.com/ktsangop/ngx-build-plus-test/-/tree/angular-15
which seems to be working as expected.
Looking at the changes made between the 2 versions https://github.com/manfredsteyer/ngx-build-plus/commit/d519571e25c36184d0f143179eabe24a71c24155 I am not sure how this could have been resolved.
The only thing that could have affected this is the "@angular-devkit/build-angular"
dependency
Hello everyone, I have noticed a strange behavior which does not seem to be compatible with the official angular builder. On our
angular.json
configuration, under architect.build.styles we have an array of external (node_modules) styles that we import like this:When building with the default angular builder, the order of CSS styles follows the order of the array above, meaning that
src/styles.scss
always overrides any styles added by e.g.bootstrap.min.css
.But when using
ngx-build-plus
this order is not preserved (not sure if it's reversed or not), and the only way to havestyles.scss
at the bottom of the compiled output, is to put it 1st (first) on the list above.I have not found any official Angular documentation on how the builder processes this list, but according to popular belief, the last item of the list should be last on the output CSS (see https://github.com/angular/angular-cli/issues/9475)
Is there any info on how we should expect
ngx-build-plus
to process this list? Thank you in advance!p.s. Dependencies on our project are as follows:
Reproduce
yarn build:prod
ornpm build:prod
for both projects/dist/{project_name}/styles.{random_hash}.scss
file in both projectsngx-build-plus
as builderSpecifically the
ngx-build-plus
output should beIn contrast the default Angular builder's output shoud be:
Note that the order of CSS files in both projects'
angular.json
build configuration is: