Build: Remove @babel/polyfill in favor of core-js/stable#1191
Build: Remove @babel/polyfill in favor of core-js/stable#1191gziolo wants to merge 1 commit intoWordPress:masterfrom gziolo:update/babel-polyfill
@babel/polyfill in favor of core-js/stable#1191Conversation
| 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.
@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 ...
| } | ||
|
|
||
| $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.
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.