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

WordPress Trac noreply at wordpress.org
Wed Jun 23 00:05:01 UTC 2021


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

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51212" 51212]:
 {{{
 #!CommitTicketReference repository="" revision="51212"
 Build/Test Tools: Add the `regenerator-runtime` script as a dependency to
 `wp-polyfill`.

 In [51146], the `core-js` package replaced the deprecated
 `@babel//polyfill` one. The `core-js` package builds `wp-polyfill` from a
 configuration provided by `@wordpress/babel-preset-default` instead of
 copying a one size fits all polyfill.

 That change caused an issue where plugins and themes relying on the
 `regenerator-runtime` script being included in the `wp-polyfill.js` file
 encountering fatal JavaScript errors.

 This adds the `regenerator-runtime` package to Core and registers it as a
 dependency for `wp-polyfill`. While Core does not require `regenerator-
 runtime`, it will allow for a smoother transition to using `core-js`.

 This dependency will be removed in a future version of WordPress, so
 developers are encouraged to add `regenerator-runtime` as a dependency for
 any custom script that requires it.

 Follow up to [51146].

 Props gziolo, herregroen, jeherve, hellofromtonya, peterwilsoncc.
 Fixes #52941.
 }}}

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


More information about the wp-trac mailing list