Skip to content
Permalink
Browse files

Script Loader: Load unminified package vendor scripts when `SCRIPT_DE…

…BUG` is set.

The unminified package vendor scripts are bundled with the release package thus the value of the `SCRIPT_DEBUG` constant should be honored.

Merge of [44391] to the 5.0 branch.

Props earnjam.
Fixes #45535.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@44393 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
ocean90 committed Jan 4, 2019
1 parent 45a8f1d commit 90ee9f51a7e4b80c63d1025c8366fe6441f16ea1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/wp-includes/script-loader.php
@@ -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 );

0 comments on commit 90ee9f5

Please sign in to comment.
You can’t perform that action at this time.