Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 5 tasks
hamzaiqbal opened this issue Aug 24, 2022 · 0 comments
Open
1 of 5 tasks

Comments

@hamzaiqbal
Copy link

hamzaiqbal commented Aug 24, 2022

Describe the bug
which template:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

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:

  • OS: Windows 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant