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

Replace promise polyfill for a pure one #180

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Conversation

luisrudge
Copy link
Contributor

@luisrudge luisrudge commented Aug 27, 2019

Description

This PR replaces the core-js promise polyfill by the promise-polyfill package.

According to this comment zone.js's promise doesn't pass the feature detection that core-js does, which causes core-js to try to polyfill it again. This throws an error in zone.js. The new promise-polyfill just checks if there's a global 'Promise' object available or not, instead of doing feature detection. As a bonus, it reduces the final bundle size in ~3kb.

References

fix #179
zloirock/core-js#608 (comment)

@luisrudge luisrudge added the tiny label Aug 27, 2019
@luisrudge luisrudge requested a review from a team August 27, 2019 15:00
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.

NPM start creates error - (window|global).Promise overwritten
3 participants