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 at build time about commonJS #533

Open
ice-blaze opened this issue Sep 5, 2023 · 0 comments
Open

Warning at build time about commonJS #533

ice-blaze opened this issue Sep 5, 2023 · 0 comments

Comments

@ice-blaze
Copy link

ice-blaze commented Sep 5, 2023

When I build my project with angular-froala-wysiwyg I get this kind of errors:

Warning: [my-module].module.ts depends on 'froala-editor/js/plugins/special_characters.min.js'. 
CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I thought we would get rid of it with the latest Ivy build but it's not the case. It would be nice to remove them for optimization and also console fatigue issues. Here is the list of all the files I get for the warnings

froala-editor/js/plugins/special_characters.min.js
froala-editor/js/languages/de.js
froala-editor/js/languages/en_gb.js
froala-editor/js/languages/fr.js
froala-editor/js/languages/it.js
froala-editor/js/plugins/align.min.js
froala-editor/js/plugins/char_counter.min.js
froala-editor/js/plugins/colors.min.js
froala-editor/js/plugins/font_family.min.js
froala-editor/js/plugins/font_size.min.js
froala-editor/js/plugins/lists.min.js
froala-editor/js/plugins/paragraph_format.min.js

Froala version 4.1.1
Angular version 15.2.9
Node version 18.10.0

The current workaround is to add those files in the allowedCommonJsDependencies option in the angular.json file but it felt like sweeping the dust under the rug...

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

1 participant