[wp-trac] [WordPress Trac] #52941: Remove `@babel/polyfill` in favor of `core-js/stable`.

WordPress Trac noreply at wordpress.org
Thu Jun 17 19:01:12 UTC 2021


#52941: Remove `@babel/polyfill` in favor of `core-js/stable`.
------------------------------+-----------------------
 Reporter:  desrosj           |       Owner:  desrosj
     Type:  task (blessed)    |      Status:  reopened
 Priority:  normal            |   Milestone:  5.8
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+-----------------------

Comment (by desrosj):

 I think the best way forward here is to fully revert, or return the `wp-
 polyfill` script to the original state and introduce a new script handle
 for the new version of the file. We can't assume which parts of the
 polyfill plugins and themes are interested in.

 I've opened a PR to take a pass at the latter option, but unless the
 packages have their dependency changed from `wp-polyfill` to `wp-polyfill-
 build` upstream in Gutenberg, both versions of the polyfill would be
 loaded.

 A few notes. I haven't been able to figure out the reason for
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-
 loader.php?rev=51146#L124 adding `wp-polyfill` as a dependency of itself].
 It's not clear to me if this should remain as is, changed to the new
 script handle, or both.

 Also, the version for the new script should probably change to reflect the
 version of the `@wordpress/babel-preset-default` package. Right now it
 reflects the version of `@babel/polyfill`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52941#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list