[wp-trac] [WordPress Trac] #60970: Remove importmap polyfill
WordPress Trac
noreply at wordpress.org
Wed Aug 28 14:38:04 UTC 2024
#60970: Remove importmap polyfill
----------------------------------------+---------------------
Reporter: swissspidy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Script Loader | Version: 6.5
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses:
----------------------------------------+---------------------
Changes (by desrosj):
* keywords: dev-feedback => needs-patch good-first-bug
Comment:
I agree with @swissspidy's interpretation of the list of supported
browsers and the responses/reasoning shared. I looked back and the `> 1%`
was introduced in [41062] (see #37651), and this appears to be how it was
interpreted at the time and since.
I think that the
[https://browsersl.ist/#q=%3E+1%25%0Alast+1+Android+versions%0Alast+1+ChromeAndroid+versions%0Alast+2+Chrome+versions%0Alast+2+Firefox+versions%0Alast+2+Safari+versions%0Alast+2+iOS+versions%0Alast+2+Edge+versions%0Alast+2+Opera+versions
link included in the ticket description] also demonstrates this
understanding is generally accepted as the best practice, and it's how
it's interpreted by the `browsersList` tool as well.
> Also, why minor and not major versions? The policy doesn't say anything
about this. If we choose major versions, iOS 16 > 1%.
Unless I'm misreading the documentation, I'm not sure that Browserslist
even provides a way to dynamically specify full ranges like you describe
@luisherranz. In order to accomplish this, we'd have to manually list out
the versions we want to support, which would also require us to monitor
browser usage ourselves and updated the configuration.
I am in favor of removing the polyfill in this instance. Normally I would
advocate that we leave the script itself in Core making it available
through a registered script handle like with `wp-polyfill-element-closest`
or `wp-polyfill-node-contains`, but
[https://wpdirectory.net/search/01J6CPFGG78CHW8AQ9AT3AGGQK usage appears
to essentially 0% in the plugin directory].
Removing and calling this out as a bulleted list item in the
"Miscellaneous 6.7 developer focused changes" dev note seems sufficient.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60970#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list