-
Notifications
You must be signed in to change notification settings - Fork 12k
Conditional ES5 Browser Polyfill Loading #13403
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
Conversation
53a32a0
to
9ab5eff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the new option in https://github.com/angular/angular-cli/blob/master/packages/angular/cli/lib/config/schema.json as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Love this feature, are there any docs on how to enable this? |
How can we enable on current projects ? |
It's enabled by defauly, just need to Update cli to v7.3.x I believe. |
Add |
How can I fix the |
@maxailloud The project most likely has an older version of Also, the team is more than happy to help when possible, but please avoid using a PR for these type of discussions as they are not generally monitored. |
Oh my bad, thought it was an issue. Thank you and sorry again. |
And on your previously created projects, don't forget to remove those es6 polyfills imports from polyfills.ts file for this feature be real effective! |
import 'core-js/es6/regexp'; | ||
import 'core-js/es6/map'; | ||
import 'core-js/es6/weak-map'; | ||
import 'core-js/es6/set'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be mistaken, but it's my understanding that polyfills are moved into an internal file. I often find that I also need to import some of the es7 modules (for example to support Object.entries
) into polifyls. Having them in an internal file won't allow me adding additional polifylls only required for legacy browsers. It'd be my preference if there was a new file generated by CLI and included in the app: polifyls.legacy.ts
or something like that.
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. |
es5BrowserSupport
option; no behavior change if option is not enabledes5BrowserSupport
is enabled in newly generated projects