Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Warning: mdb-calendar.js depends on 'date-fns'

ammi pro asked 3 years ago


I use Angular 11.2.14 and mdb-calendar 11.1.0 When I compile project, I see:

Warning: C:\MyProject\node_modules\mdb-calendar__ivy_ngcc__\fesm2015\mdb-calendar.js depends on 'date-fns'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

How can it be resolved?


Arkadiusz Idzikowski staff commented 3 years ago

@ammi It looks like the problem is caused by one of our external dependencies. This may result in a slightly bigger size of app build, but it should not in any way affect how the plugin works. We will take a closer look at that and see if we can add a solution to this problem on our end.


Arkadiusz Idzikowski staff answered 3 years ago


It looks like we would have to use a new major version of date-fns dependency (which has a lot of breaking changes) to fix this problem. We are now giving more priority to fixing bugs in the library, for now, please add this dependency to the list of allowed commonJs dependencies as suggested in the Angular documentation:

https://angular.io/guide/build#configuring-commonjs-dependencies



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB4 11.1.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes