alberthaff / ngx-papaparse

Papa Parse wrapper for Angular
https://alberthaff.dk/projects/ngx-papaparse/docs/v8
MIT License
90 stars 19 forks source link

Angular10 reports a CommonJS warning for PapaParse #65

Closed sserdyuk closed 4 years ago

sserdyuk commented 4 years ago

Angular produces this message at the build. I can temporarily suppress it by adding an exception to angular.json file, but it would be nice to have the library properly packaged. Here's a link to Angular's documentation on CommonJS related issues: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /home/sergei/Projects/Angular/revenue-matters/node_modules/ngx-papaparse/__ivy_ngcc__/fesm2015/ngx-papaparse.js depends on 'papaparse/papaparse.min.js'. CommonJS or AMD dependencies can cause optimization bailouts.

Amanpreet21 commented 4 years ago

I am adding this : "allowedCommonJsDependencies": [ "ngx-papaparse" ] to angular.json build part but not able to suppress the warning.

alberthaff commented 4 years ago

I have just release V5. This is a problem with Papa Parse being a Common JS library. However, as @Amanpreet21 pointed out, you can disable the warning. More information here: https://alberthaff.dk/projects/ngx-papaparse/docs/v5/installation/angular-10-or-later