Script Loader: Remove `importmap` polyfill.
The polyfill was added in [57492], but all browsers supported by WordPress already support import maps. This not only disables the polyfill, but completely removes it as it was only added recently and there is no usage outside of core. Props swissspidy, desrosj, luisherranz, gziolo. Fixes #60970. Built from https://develop.svn.wordpress.org/trunk@58952 git-svn-id: http://core.svn.wordpress.org/trunk@58348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
94b9ccd020
commit
6665a4e30a
|
@ -236,20 +236,6 @@ class WP_Script_Modules {
|
|||
public function print_import_map() {
|
||||
$import_map = $this->get_import_map();
|
||||
if ( ! empty( $import_map['imports'] ) ) {
|
||||
global $wp_scripts;
|
||||
if ( isset( $wp_scripts ) ) {
|
||||
wp_print_inline_script_tag(
|
||||
wp_get_script_polyfill(
|
||||
$wp_scripts,
|
||||
array(
|
||||
'HTMLScriptElement.supports && HTMLScriptElement.supports("importmap")' => 'wp-polyfill-importmap',
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'wp-load-polyfill-importmap',
|
||||
)
|
||||
);
|
||||
}
|
||||
wp_print_inline_script_tag(
|
||||
wp_json_encode( $import_map, JSON_HEX_TAG | JSON_HEX_AMP ),
|
||||
array(
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -96,7 +96,6 @@ function wp_default_packages_vendor( $scripts ) {
|
|||
'lodash',
|
||||
'wp-polyfill-fetch',
|
||||
'wp-polyfill-formdata',
|
||||
'wp-polyfill-importmap',
|
||||
'wp-polyfill-node-contains',
|
||||
'wp-polyfill-url',
|
||||
'wp-polyfill-dom-rect',
|
||||
|
@ -122,7 +121,6 @@ function wp_default_packages_vendor( $scripts ) {
|
|||
'wp-polyfill-object-fit' => '2.3.5',
|
||||
'wp-polyfill-inert' => '3.1.2',
|
||||
'wp-polyfill' => '3.15.0',
|
||||
'wp-polyfill-importmap' => '1.8.2',
|
||||
);
|
||||
|
||||
foreach ( $vendor_scripts as $handle => $dependencies ) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58951';
|
||||
$wp_version = '6.7-alpha-58952';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue