Skip to content

CommonJS or AMD dependencies can cause optimization bailouts #71

@jonplata

Description

@jonplata

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions