Script Loader: Load unminified package vendor scripts when SCRIPT_DEBUG is set.
The unminified package vendor scripts are bundled with the release package thus the value of the `SCRIPT_DEBUG` constant should be honored. Props earnjam. See #45535. Built from https://develop.svn.wordpress.org/trunk@44391 git-svn-id: http://core.svn.wordpress.org/trunk@44221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -76,7 +76,7 @@ function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
|
||||
function wp_default_packages_vendor( &$scripts ) {
|
||||
global $wp_locale;
|
||||
|
||||
$dev_suffix = wp_scripts_get_suffix( 'dev' );
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
|
||||
$vendor_scripts = array(
|
||||
'react' => array( 'wp-polyfill' ),
|
||||
@@ -108,7 +108,7 @@ function wp_default_packages_vendor( &$scripts ) {
|
||||
$dependencies = array();
|
||||
}
|
||||
|
||||
$path = "/wp-includes/js/dist/vendor/$handle$dev_suffix.js";
|
||||
$path = "/wp-includes/js/dist/vendor/$handle$suffix.js";
|
||||
$version = $vendor_scripts_versions[ $handle ];
|
||||
|
||||
$scripts->add( $handle, $path, $dependencies, $version, 1 );
|
||||
|
||||
Reference in New Issue
Block a user