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

Angular version 10 - CommonJS import warnings #1283

Closed
mbladel opened this issue Jun 25, 2020 · 8 comments
Closed

Angular version 10 - CommonJS import warnings #1283

mbladel opened this issue Jun 25, 2020 · 8 comments

Comments

@mbladel
Copy link

mbladel commented Jun 25, 2020

Describe the bug

When building with the new angular version 10 angular-calendar triggers several warnings caused by using CommonJS dependencies instead of ecmascript module.

For example: .../app.module.ts depends on angular-calendar/date-adapters/date-fns. CommonJS or AMD dependencies can cause optimization bailouts.

You can read more about why this might be a problem at angular.io.
I was wondering wether this could be fixed as it may improve bundle sizes significantly when building.

Minimal reproduction of the problem with instructions

Update project to angular 10.0 and run ng build.

Screenshots

Versions

  • @angular/core: 10.0.0
  • angular-calendar: 0.28.16
  • Browser name and version: any
@matts-bot
Copy link

matts-bot bot commented Jun 25, 2020

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me

@mattlewis92
Copy link
Owner

Oh yeah that is not good at all, we should be shipping ESM to npm for the date adapters, thanks for bringing it to my attention! I will get this fixed in the next major version 😄

@mattlewis92 mattlewis92 mentioned this issue Jun 26, 2020
@manu2495
Copy link

any update ?

@sai0553
Copy link

sai0553 commented Aug 27, 2020

I am seeing the same warnings. Request you to kindly update your package.

@mattlewis92
Copy link
Owner

Hey folks, thanks for your patience on this, I've been a little bit busy the last few months but finally had the time this weekend to put out a fix. If you update to 0.28.17 then it should fix the warning message and your bundle sizes should be a little bit smaller as a result 😄

@sai0553
Copy link

sai0553 commented Sep 12, 2020

Thank you so much. The update did remove so many warnings. There is only one warning that's remaining though.

WARNING in frontend\node_modules\angular-draggable-droppable_ivy_ngcc_\fesm2015\angular-draggable-droppable.js depends on '@m
attlewis92/dom-autoscroller'. CommonJS or AMD dependencies can cause optimization bailouts.

@mattlewis92
Copy link
Owner

Thank you so much. The update did remove so many warnings. There is only one warning that's remaining though.

WARNING in frontend\node_modules\angular-draggable-droppable__ivy_ngcc__\fesm2015\angular-draggable-droppable.js depends on '@m
attlewis92/dom-autoscroller'. CommonJS or AMD dependencies can cause optimization bailouts.

I've just noticed that as well when testing, please give 0.28.18 a go, it should get rid of it 😄

@manu2495
Copy link

nice ! it works for me right now

AlexGuz23 pushed a commit to AlexGuz23/calendar-utils that referenced this issue Nov 3, 2022
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

4 participants