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

Getting CommonJS or AMD dependencies can cause optimization bailouts #87

Closed
motohead400 opened this issue Oct 27, 2023 · 3 comments
Closed

Comments

@motohead400
Copy link

It looks like this module should be importing cropperjs via

import Cropper from 'cropperjs/dist/cropper.esm.js';
fengyuanchen/cropperjs#1010

@matheusdavidson
Copy link
Owner

Hi, to fix that warning you should add cropperjs to allowedCommonJsDependencies in your angular.json:

https://bobbyhadz.com/blog/angular-commonjs-or-amd-dependencies-can-cause-optimization-bailouts#adding-the-package-to-allowedcommonjsdependencies-in-angularjson

meanwhile I’ll investigate the benefits of using the esm build

@motohead400
Copy link
Author

Hello, that just removes the warning but doesn't fix the problem. As it states, dependencies on commonjs cause optimization bailouts, so that dependency will cause a much larger package.

@motohead400
Copy link
Author

Hi, any word on this?

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

2 participants