hamzahamidi / ajsf

Angular JSON Schema Form
https://hamzahamidi.github.io/ajsf
MIT License
358 stars 182 forks source link

Warnings due to CommonJS or AMD dependencies which can cause optimization bailouts #327

Open hamzaiqbal opened 1 year ago

hamzaiqbal commented 1 year ago

Describe the bug which template:

Hello, My project currently uses @ajsf/core and @ajsf\bootstrap4 in version 0.7.0 with Angular 13.

During compilation, I have 2 warnings due to lodash/cloneDeep and lodash/map

Warning: c:\Dev\WebAdmin\node_modules\@ajsf\bootstrap4\__ivy_ngcc__\fesm2015\ajsf-bootstrap4.js depends on 'lodash/cloneDeep'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: c:\Dev\WebAdmin\node_modules\@ajsf\bootstrap4\__ivy_ngcc__\fesm2015\ajsf-bootstrap4.js depends on 'lodash/map'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I hid the warnings by adding the concerned dependencies in angular.json "allowedCommonJsDependencies": ["lodash/cloneDeep", "lodash/map"]

To Reproduce Steps to reproduce the behavior:

  1. Install Angular 13
  2. Install @ajsf/core and @ajsf\bootstrap4 in version 0.7.0
  3. Build project

Expected behavior No warning during compilation. Are these known issues ? Is it planned to fix them in a future version ?

Desktop: