From a6b9c3d5423cbe97036aaad25b01e0e6b21ba11e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 10 Apr 2024 14:42:17 +0000 Subject: [PATCH] Script Loader: stop enqueueing some now obsolete polyfills. Stop enqueueing polyfills such as `wp-polyfill-inert` (for the `inert` attribute) and `regenerator-runtime` (for generator functions), as they are no longer needed, considering the WordPress project's [https://make.wordpress.org/core/handbook/best-practices/browser-support/ browser support policy]. In addition to that, `wp-polyfill` (essentially `core-js`) is no longer enqueued as a dependency of `react`. This was added in [43903] to ensure compatibility with IE 11, which is no longer supported by WordPress. Developers requiring `wp-polyfill` need to manually add it as a dependency for their scripts. Props swissspidy, flixos90, adamsilverstein, youknowriad, gziolo. Fixes #60962. Built from https://develop.svn.wordpress.org/trunk@57981 git-svn-id: http://core.svn.wordpress.org/trunk@57467 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 032a2f2640..d98b0e4d2d 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -89,8 +89,8 @@ function wp_default_packages_vendor( $scripts ) { $suffix = wp_scripts_get_suffix(); $vendor_scripts = array( - 'react' => array( 'wp-polyfill' ), - 'react-dom' => array( 'react' ), + 'react', + 'react-dom' => array( 'react' ), 'regenerator-runtime', 'moment', 'lodash', @@ -103,7 +103,7 @@ function wp_default_packages_vendor( $scripts ) { 'wp-polyfill-element-closest', 'wp-polyfill-object-fit', 'wp-polyfill-inert', - 'wp-polyfill' => array( 'wp-polyfill-inert', 'regenerator-runtime' ), + 'wp-polyfill', ); $vendor_scripts_versions = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 584799e5c6..70375352ad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57949'; +$wp_version = '6.6-alpha-57981'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.