rfdc'。 CommonJS 或 AMD 依赖项可能会导致使用 ngx-charts lib 的 ANGULAR PROJECT 进行优化救援

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

我的 Angular 项目有问题:

当我构建我的应用程序时,我有这个错误日志:

"Warning: C:\--------------------------------------------------testcode\node_modules\@swimlane\ngx-charts\fesm2020\swimlane-ngx-charts.mjs depends on 'rfdc'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
"

这就是我的库列表:

├── @angular-devkit/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @swimlane/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

我不知道如何解决?

你能帮我吗?如果您想要另一部分代码请告诉我!

angular ngx-charts
1个回答
0
投票

尝试将此库添加到

allowedCommonJsDependencies
angular.json

数组属性中
  ...
  "options": {
     "allowedCommonJsDependencies": [
        "rfdc"
     ],
     ...
© www.soinside.com 2019 - 2024. All rights reserved.