Make WordPress Core


Ignore:
Timestamp:
04/10/2024 02:40:05 PM (15 months ago)
Author:
swissspidy
Message:

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 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r57713 r57981  
    9090
    9191    $vendor_scripts = array(
    92         'react'       => array( 'wp-polyfill' ),
    93         'react-dom'   => array( 'react' ),
     92        'react',
     93        'react-dom' => array( 'react' ),
    9494        'regenerator-runtime',
    9595        'moment',
     
    104104        'wp-polyfill-object-fit',
    105105        'wp-polyfill-inert',
    106         'wp-polyfill' => array( 'wp-polyfill-inert', 'regenerator-runtime' ),
     106        'wp-polyfill',
    107107    );
    108108
Note: See TracChangeset for help on using the changeset viewer.