Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: 'chart.js'. CommonJS or AMD dependencies can cause optimization bailouts

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

like image 385
akhilreddy Avatar asked Dec 23 '20 09:12

akhilreddy


1 Answers

Add in angular.json "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "allowedCommonJsDependencies": ["chart.js"],

like image 185
akhilreddy Avatar answered Oct 16 '22 23:10

akhilreddy