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

Warning: ng-gallery.mjs depends on 'bezier-easing'. CommonJS or AMD dependencies can cause optimization bailouts. #525

Closed
DywiTom opened this issue Feb 16, 2023 · 3 comments · Fixed by #556

Comments

@DywiTom
Copy link

DywiTom commented Feb 16, 2023

What is the expected behavior?

No Warning

What is the current behavior?

I got while compiling the following warning:

Warning: C:\...\node_modules\ng-gallery\fesm2020\ng-gallery.mjs depends on 'bezier-easing'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

What are the steps to reproduce?

ng serve

Which versions are you using for the following packages?

Angular: 15.1.6
Angular CDK: 15.1.4
Angular CLI: 15.1.6
Typescript: 4.9.5
Gallery: 8.0.2

Is there anything else we should know?

Thank you for your great work.

@DywiTom DywiTom changed the title Warning: C:\xampp\htdocs\dywinet\node_modules\ng-gallery\fesm2020\ng-gallery.mjs depends on 'bezier-easing'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies Warning: ng-gallery.mjs depends on 'bezier-easing'. CommonJS or AMD dependencies can cause optimization bailouts. Feb 16, 2023
@MurhafSousli
Copy link
Owner

MurhafSousli commented Apr 23, 2023

In your angular.json add bezier-easing to allowedCommonJsDependencies like the following

ngx-gallery/angular.json

Lines 61 to 62 in 814a1fc

"allowedCommonJsDependencies": [
"bezier-easing",

@DywiTom
Copy link
Author

DywiTom commented Apr 28, 2023

Thanks for your answer.
It's a workaround, not solving actually the 'problem'.

@MurhafSousli
Copy link
Owner

MurhafSousli commented Apr 28, 2023

There is no problem with using a common.js dependency in Angular, it won't affect the performance of the app, but maybe I can include the easing function internally in the next releases

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

Successfully merging a pull request may close this issue.

2 participants