Make WordPress Core

Ticket #62422: 62422.patch

File 62422.patch, 1.1 KB (added by seanlanglands, 14 months ago)

prepends react and react-dom script version strings with '-umd' to force clients to request the updated umd build scripts

  • src/wp-includes/script-loader.php

    Subject: [PATCH] Prevent browser cache inconsistencies in relation to React custom 
    builds vs React UMD builds when upgrading from WordPress 6.6.2 (#62422)
    
    This change prepends react and react-dom script version strings with
    '-umd' to force clients to request the updated umd build scripts 
    (e.g., react.min.js?ver=18.3.1-umd).
    ---
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    a b  
    106106        );
    107107
    108108        $vendor_scripts_versions = array(
    109                 'react'                       => '18.3.1',
    110                 'react-dom'                   => '18.3.1',
     109                'react'                       => '18.3.1-umd',
     110                'react-dom'                   => '18.3.1-umd',
    111111                'react-jsx-runtime'           => '18.3.1',
    112112                'regenerator-runtime'         => '0.14.1',
    113113                'moment'                      => '2.30.1',