[wp-trac] [WordPress Trac] #53078: Stop loading polyfills specific to Internet Explorer

WordPress Trac noreply at wordpress.org
Mon Apr 26 16:01:12 UTC 2021

#53078: Stop loading polyfills specific to Internet Explorer
 Reporter:  desrosj        |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.8
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:

Comment (by youknowriad):

 Thanks for auditing these

 > Some other details to consider. These scripts are only loaded if they
 are actually needed. And the polyfills need to continue to be bundled in
 Core just in case a plugin or theme is specifying as a dependency or

 IMO, we shouldn't keep these poly fills around, but we just keep the WP
 script handle (with an empty content), that way, plugins referring to
 these handles won't break but IE11 support is removed.

 These discrete poly fills are needed for IE11 only so should be good to
 go. The most complex one we'd have to deal with is `wp-polyfill` which
 corresponds to the now deprecated `babel-polyfill`. this contains a number
 of generic JS polyfills like generator runtime, Map, Set, some new array
 functions... While most of these are only required for IE11, some of these
 might be required for the currently supported browers. And this polyfill
 is a dependency of all scripts and it's the biggest one, so I believe we
 need to do some work here in order to know what exactly is needed for IE11
 only and can be safely removed. We can use `core-js` to build a custom
 light version of this polyfill. I expect that we'll see a very big drop in
 terms of Kbs shipped in the end.

Ticket URL: <https://core.trac.wordpress.org/ticket/53078#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list