notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
635 stars 55 forks source link

[BUG] - CommonJS or AMD dependencies can cause optimization bailouts #78

Closed johnbendi closed 10 months ago

johnbendi commented 10 months ago

Describe the bug

Using notiflix from an Angular project throws the above warning message

To Reproduce

Steps to reproduce the behavior:

  1. Create an Angular version 15 component.
  2. Import Confirm or Block from Notifix
  3. Use Confirm or Block in the code
  4. Save the file
  5. Compile the file to get the warning message: Component depends on 'notiflix'. CommonJS or AMD dependencies can cause optimization bailouts

Expected behavior

Component should compile without warning

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

None.

furcan commented 10 months ago

Hello.

It is obvious that this package is not your package if you are considering ESM.

Notiflix uses UMD and works everywhere if window exist.

You can please ignore this development time error or please use another library.

Thanks, Furkan