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

Exclude polyfills from the bundle #450

Open
kaproslaci opened this issue Sep 14, 2020 · 2 comments
Open

Exclude polyfills from the bundle #450

kaproslaci opened this issue Sep 14, 2020 · 2 comments
Labels

Comments

@kaproslaci
Copy link

Describe the bug
Including the polyfill causes incompatibilities with other libraries. I'd suggest removing the polyfill from the bundle and include it besides. I reproduced it in a very specific environment but I suppose others may suffer from the issue too. Just by reading issues, similar situations can occur with other components, such as ag-grid, vue-filepond... Also, I think managing outdated browsers and polyfills is the responsibility of the library user, not the library owner (i.e: why the polyfills if someone dropped IE support?)

To Reproduce
Steps to reproduce the behavior:

  1. Create an Angular 8+ application depending on ng-bootstrap.
  2. Insert an ngbDropdownToggle.
  3. Insert the tui-image-editor in a lazy-loaded module.
  4. After navigating to the lazy loaded module, every time you click on the dropdown toggle, the application is going to freeze.
    It is caused by the svgxuse polyfill that will create a MutationObserver which will trigger an infinite loop of dom change for example in the described situation above.

Expected behavior
Include the polyfills separately or just write them into readme so the library users can decide if they wanna use them.

Desktop (please complete the following information):
I reproduced this issue on Chrome and Firefox on Mac and Windows as well. I assume every kind of chrome and Firefox were affected.

@kaproslaci kaproslaci added the Bug label Sep 14, 2020
@jinwoo-kim-nhn
Copy link
Contributor

@kaproslaci Thanks for letting me know. I will refer to it for improvement.

@viveks7
Copy link

viveks7 commented Sep 5, 2023

@kaproslaci Thanks for letting me know. I will refer to it for improvement.

Any updates on this? We also ran into same issue using this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants