ng 构建会导致伪选择器发出警告

问题描述 投票:0回答:1

我在

ng build

期间遇到错误
[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: %

我已将我的应用程序从

Angular v16
升级到
Angular v17
并使用下面给出的当前最新版本更新了
aws
软件包。

"dependencies": {
  // skipped rest of the packages
  "@aws-amplify/ui-angular": "^5.0.14",
  "@aws-sdk/client-quicksight": "^3.574.0",
  "amazon-quicksight-embedding-sdk": "^2.7.0",
  "aws-amplify": "^6.3.0",
}
angular css-selectors aws-amplify
1个回答
0
投票

通过将以下配置添加到

production
文件中的
angular.json
解决了此问题。

"configurations": {
  // skipped rest of the code for clarity
  "production": {
    "optimization": {
      "scripts": true,
      "styles": {
        "minify": true,
        "inlineCritical": false
      },
      "fonts": true
    }
  }
  // skipped rest of the code for clarity
}
© www.soinside.com 2019 - 2024. All rights reserved.