Croppie icon indicating copy to clipboard operation
Croppie copied to clipboard

Feature request - Please add support for ES2015

Open mehmetgunacti opened this issue 5 years ago • 2 comments

It seems that current version of Croppie is available as CommonJS module only.

Google suggests avoiding the use of CommonJS modules since it impacts the tree-shaking of application. Ref: https://web.dev/commonjs-larger-bundles/

I would, therefore, request you to please release this package as an ES2015 module as well.

Thank you

Angular project warnings :

WARNING in /home/.../Projects/angular-library/library/dist/lib/... depends on croppie.
CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

mehmetgunacti avatar Jul 20 '20 11:07 mehmetgunacti

Ever since Angular 10 came out this will be a warning that is thrown for a lot of applications (mine included). Would be great seeing ES modules artifacts in the croppie package. I might have a look at changing the current build configuration for this if I find the time 👌

Timebutt avatar Aug 29 '20 14:08 Timebutt

I developed a simplified fork named Cropt which is written in TypeScript and published as a native ES module. It also has a higher quality image scaling algorithm and numerous other improvements. https://github.com/theodorejb/cropt

theodorejb avatar Mar 07 '24 15:03 theodorejb