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
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
Most helpful comment
In v3 we will be publishing an ES module