-
Notifications
You must be signed in to change notification settings - Fork 56
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 direct es6-promise dependency #41
Comments
Bump. |
I agree that it would be great to be able to remove the Do you have any suggestions for an elegant way for the consumer to provide a promise polyfill? As far as I can tell, it's currently only IE that lacks Maybe it would be a better approach to try to find a more lightweight Promise polyfill? es6-promise is currently 315 kB, while promise-polyfill is 42.5 kB (https://www.npmjs.com/package/promise-polyfill). |
Hey @jonbern, what do you think about pushing the responsibility of polyfilling Promise on to the consumer? The way I see it This would be a breaking change of course. |
I think that's a very valid point. Given that all browsers except IE support promises, and also that IE is the only browser that doesn't support the Fetch API, I would think it should be safe to leave responsibility of adding the necessary polyfills to the user code. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API |
I guess yet another option would be to offer 2 exports: one with the polyfill and one without (a bit like cross-fetch). That way you could avoid a breaking change. Still, for the reasons I already mentioned I would probably take the breaking change to remove the dependency altogether. |
I have created a new major version without the es6-promise dependency. Thanks for bringing up the issue, and for providing valuable input and good suggestions. |
Would you consider removing es6-promise dependency and let consumer provide es6-promise polyfill
The text was updated successfully, but these errors were encountered: