Chart.js: Angular 10 issue -> optimization bailouts

Created on 25 Jun 2020  Â·  2Comments  Â·  Source: chartjs/Chart.js

WARNING in [...] depends on chart.js. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

bug

Most helpful comment

In v3 we will be publishing an ES module

All 2 comments

In v3 we will be publishing an ES module

For now, I fixed the issue by adding (whitlisting) below line in angular.json

"architect": {
  "build": {
    ...
    "options": {
      "allowedCommonJsDependencies": ["chart.js"]
    }
  }
}

Reference taken from: Stackoverflow: Angular 10 Upgrade - Fix CommonJS or AMD dependencies can cause optimization bailouts

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benmccann picture benmccann  Â·  3Comments

HeinPauwelyn picture HeinPauwelyn  Â·  3Comments

longboy picture longboy  Â·  3Comments

nanospeck picture nanospeck  Â·  3Comments

gabrieldesouza picture gabrieldesouza  Â·  3Comments