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

Remove the CustomEvent polyfill from the bundle #536

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

stof
Copy link
Contributor

@stof stof commented Feb 28, 2019

Motivation and Context

#519 (comment) says the CustomEvent polyfill was kept in the library because it cannot be loaded from polyfill.io. but it actually can be loaded.

Types of changes

This could be considered as a BC break for people supporting old browsers, as they now need to load an additional polyfill (the polyfill.io URL in the readme got updated).

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshjohnson
Copy link
Collaborator

Thanks 🎉

@jshjohnson jshjohnson merged commit 56845e3 into Choices-js:master Mar 29, 2019
@stof stof deleted the remove_polyfill branch April 1, 2019 08:55
@axten
Copy link

axten commented Apr 3, 2019

imho a bad decision because core-js do not include a CustomEvent Polyfill.
So auto polyfilling with babel dont work anymore.

@stof
Copy link
Contributor Author

stof commented Apr 3, 2019

@axten but that's also true for Element.prototype.classList or window.requestAnimationFrame, as core-js does not include web polyfills (yet) but ES polyfills.
The rules set by @jshjohnson previously is to bundle polyfills only if they cannot be loaded easily from polyfill.io
Forcing to bundle the polyfill would lead to loading multiple polyfills for CustomEvent if any other library also loads one.

@axten
Copy link

axten commented Apr 3, 2019

hmpf, actually all browsers in my scope have classList and requestAnimationFrame, so CustomEvent is the only problem for me now... we dont want to use polyfill.io so I now have to add a polyfill manually or stick to version 6

@stof
Copy link
Contributor Author

stof commented Apr 3, 2019

@axten polyfilling yourselves is still a better choice. If 2 libraries you use need to use CustomEvent, you don't want both of them to load the polyfill, as the browser would end up downloading it twice.

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

Successfully merging this pull request may close these issues.

3 participants