angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.68k stars 11.98k forks source link

Bug: ng build cause warnings with pseudo-selectors in aws-amplify #27651

Closed wasifnaeem closed 2 months ago

wasifnaeem commented 2 months ago

Command

build

Is this a regression?

The previous version in which this bug was not present was

Angular 16

Description

I had no issue with Angular 16. When I upgraded this to Angular 17, experience this issue with aws-amplify css selectors

Minimal Reproduction

ng build

"dependencies": {
    "@angular/animations": "^17.3.9",
    "@angular/cdk": "^17.3.9",
    "@angular/common": "^17.3.9",
    "@angular/compiler": "^17.3.9",
    "@angular/core": "^17.3.9",
    "@angular/forms": "^17.3.9",
    "@angular/platform-browser": "^17.3.9",
    "@angular/platform-browser-dynamic": "^17.3.9",
    "@angular/platform-server": "^17.3.9",
    "@angular/router": "^17.3.9",
    "@aws-amplify/ui-angular": "^5.0.15",
    "@aws-sdk/client-quicksight": "^3.577.0",
    "@mobiscroll/angular": "npm:@mobiscroll/angular-ivy@5.28.1",
    "amazon-quicksight-embedding-sdk": "^2.7.0",
    "aws-amplify": "^6.3.2",
    "chart.js": "^4.4.2",
    "chartjs-plugin-datalabels": "^2.2.0",
    "countries-and-timezones": "^3.6.0",
    "google-libphonenumber": "^3.2.34",
    "luxon": "^3.4.4",
    "ng2-charts": "^6.0.1",
    "ngx-image-cropper": "^8.0.0",
    "ngx-timeago": "^3.0.0",
    "primeicons": "^7.0.0",
    "primeng": "^17.16.1",
    "rxjs": "~7.8.1",
    "socket.io-client": "^4.7.5",
    "subsink": "^1.0.2",
    "ts-access-control": "^0.1.20",
    "tslib": "^2.6.2",
    "xlsx": "^0.18.5",
    "zone.js": "~0.14.5"
  }

Exception or Error

[WARNING] 6 rules skipped due to selector errors:
  .amplify-accordion__item:where() -> Empty sub-selector
  .amplify-accordion__item:where() -> Empty sub-selector
  0% -> Unmatched selector: %
  50% -> Unmatched selector: %
  0% -> Unmatched selector: %
  50% -> Unmatched selector: %

Your Environment

Angular CLI: 17.3.7
Node: 20.11.0
Package Manager: npm 10.2.4
OS: darwin arm64

Angular: 17.3.9
... animations, cdk, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.7
@angular-devkit/build-angular   17.3.7
@angular-devkit/core            17.3.7
@angular-devkit/schematics      17.3.7
@angular/cli                    17.3.7
@schematics/angular             17.3.7
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.5

Anything else relevant?

Added the following configurations to angular.json to skip these warnings but invain.

"optimization": {
  "scripts": true,
  "fonts": {
    "inline": true
  },
  "styles": {
    "minify": true,
    "inlineCritical": false
  }
}
alan-agius4 commented 2 months ago

Duplicate of https://github.com/angular/angular-cli/issues/25725

angular-automatic-lock-bot[bot] commented 1 month ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.