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

CommonJS or AMD dependencies can cause optimization bailouts #71

Open
1 task done
jonplata opened this issue Oct 25, 2022 · 2 comments
Open
1 task done

CommonJS or AMD dependencies can cause optimization bailouts #71

jonplata opened this issue Oct 25, 2022 · 2 comments

Comments

@jonplata
Copy link

jonplata commented Oct 25, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

ngx-filepond lib in Angular 14 generates console warnings connected to filepond library and filepond plugins.

filepond lib seems to have the esm build in the node_modules, yet warnings are still visible.

Warning: /home/projects/node-uttar5/node_modules/ngx-filepond/__ivy_ngcc__/fesm2015/ngx-filepond.js depends on 'filepond'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Same warnings appear if any of the filepond plugins are used:

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-file-validate-size'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-file-validate-type'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-image-crop'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-image-exif-orientation'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-image-preview'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/projects/node-dzre4t/src/app/app.module.ts depends on 'filepond-plugin-image-validate-size'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

To reproduce:
Open: https://stackblitz.com/edit/node-uttar5

Describe the solution you'd like

Is there any chance to get rid of these warnings?

Describe alternatives you've considered

Angular docs suggest adding CommonJS libs to exceptions, but it seems more like a temporary solution.

@rikschennink
Copy link
Collaborator

I'm honestly not super familiar with Angular so any input/ideas are welcome.

@contherad
Copy link

This error was present for me as well, but when I added FilePond styles path ./node_modules/filepond/dist/filepond.min.css to the build.options.styles property in angular.json the error cleared.

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

3 participants