-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Build: Remove @babel/polyfill
in favor of core-js/stable
#1191
Conversation
@@ -73,7 +73,8 @@ module.exports = function( env = { environment: 'production', watch: false, buil | |||
|
|||
const vendors = { | |||
'lodash.js': 'lodash/lodash.js', | |||
'wp-polyfill.js': '@babel/polyfill/dist/polyfill.js', | |||
'wp-polyfill-core-js.js': 'core-js/stable/index.js', |
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.
@desrosj, I need to do some research because it doesn't look like core-js
has a distribution version but rather a long list of require
calls ...
@@ -121,7 +123,7 @@ function wp_default_packages_vendor( $scripts ) { | |||
$scripts->add( $handle, $path, $dependencies, $version, 1 ); | |||
} | |||
|
|||
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) ); | |||
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill-core-js', 'wp-polyfill-regenerator' ) ); |
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.
This looks good. We need to be careful to not change the script handle. I don't think the other changes above will have any affect on that. But we should just double check.
Hey @gziolo! Thanks for this PR! 👍 I just wanted to bring up a note I left on the Trac ticket around the aggressiveness of |
@sgomes, thanks for the pointer. I arrived at the same documentation before reading your comment when looking at how to reword notes in WordPress packages after dropping support for IE11. |
I'm exploring a completely revised approach in WordPress/gutenberg#31279. |
The revised approach was merged into the Gutenberg repository and will be merged to Core. |
Yes, good catch. I will try to publish the change to npm so we can try again using the polyfill from |
Trac ticket: https://core.trac.wordpress.org/ticket/52941
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.