You can dequeue a minified script with wp_dequeue_script()
and then enqueue the non-minified version with wp_enqueue_script()
.
Ref
Thanks, this hack didn’t work out the way I hoped though.
I did manage to successfully swap out the .min.js with the .js but buddypress is exhibiting broken behaviour.
To be specific I’m swapping out bp-cover-image.min.js and bp-plupload.min.js with their unminified equivalents, and that’s breaking the cover photo step in group creation.
add_action('wp_enqueue_scripts', function () {
/*
* Unminified js breaking cover photo
*/
wp_dequeue_script('bp-plupload');
wp_enqueue_script('bp-pluploadz', plugins_url() . '/buddypress/bp-core/js/bp-plupload.js');
wp_dequeue_script('bp-cover-image');
wp_enqueue_script('bp-cover-imagez', plugins_url() . '/buddypress/bp-core/js/cover-image.js');
}, 100);
Try using define( 'SCRIPT_DEBUG', true );
in your wp-config file.
That did the trick. Thanks.