-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
Make ZoneAwarePromise spec compliant and compatible with core-js #33989
Comments
@TazmanianD , thanks, I have created a PR to implement |
fixed by #34162, please wait for the next release, if the issue still exists, please tell me, thanks. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🚀 feature request
Relevant Package
This feature request is for @angular/zone.js
Description
I'm not an Angular developer so I'm not in much of a position to provide details on the Angular side. I'm a developer working on a webpack application that uses core-js to provide polyfills and my application is one that other sites can embed in their application.
The core-js polyfill does some checks to determine if the system has a spec compliant Promise and if not, it will use its own setting it in the global scope. The ZoneAwarePromise does not pass the core-js checks and as a result gets overridden by core-js with the result being that the Angular application stops functioning.
Most of the initial responses to this problem is that you should load the core-js application first but in our case that is not an option since we're an external application that is loaded later as an asynchronous embedding.
There was an issue file for exactly this in the zone.js repo: angular/zone.js#783 so I'm basically recreating that issue here. That issue was just closed without any actual resolution and then the whole repo was archived when it was merged here.
There was a similar question posed in core-js: zloirock/core-js#319 that offers a suggestion for what seems like a simple change that can be made to ZoneAwarePromise that would make it compliant enough to pass the core-js checks.
The project that we were causing trouble for was using Angular 7.2.15.
Describe the solution you'd like
zloirock/core-js#319 (comment)
Describe alternatives you've considered
In our webpack application, the solution was to not import the polyfill as part of the webpack configuration but to only do it conditionally if there is no Promise at all:
The text was updated successfully, but these errors were encountered: