Is there a specific order of operations to force AO2.8 to modify the excluded scripts string to include jquery.min.js? I’ve tried upgrading to 2.8 both before and after upgrading to WP5.6 and in neither case was jquery.min.js appended to my list of excluded scripts.
* I tried a custom list of scripts which did not have jquery.min.js appended:
s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,seal.js,jquery.js,reviews.widget,scheduler.widget, wp-content/plugins/revslider/, wp-content/plugins/gravityforms/
* The following excluded string DID get jquery.min.js added to the end:
wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, wp-content/plugins/revslider/, wp-content/plugins/modal-window/, wp-content/plugins/gravityforms/, wp-content/plugins/UABB/
* I thought maybe your append search was looking for the inclusion of “js/jquery/jquery.js” and it appears that was a correct assumption. I modified the first completely non-default string to include the old-style WP path to jquery:
s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,seal.js, js/jquery/jquery.js, reviews.widget,scheduler.widget, wp-content/plugins/gravityforms/, datepicker.min.js
which was updated to:
s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,seal.js, js/jquery/jquery.js, reviews.widget,scheduler.widget, wp-content/plugins/gravityforms/, datepicker.min.js, js/jquery/jquery.min.js
If the conclusion I’ve come to is in fact accurate, I STRONGLY suggest simply setting the minimum requirement of the script exclusion string containing the regex
/,.*?jquery\.js.*?,/
have appended “js/jquery/jquery.min.js”, or perhaps more generically “jquery.min.js”
or maybe you could use a regex of
/,(.*?)jquery\.js(.*?),/
replaced with
“,$1jquery.min.js$2,”
I think it’s of greater service to the plugin users to be overly-proactive about excluding jquery.min.js with the WP5.6 upgrade. As-is, the addition of jquery.min.js to the exclusion only addresses the WP-specific jquery, but if any site which has modified the _way_ jquery is excluded, the worst-case scenario of the site breaking will happen. Being more fast-and-loose about appending jquery.min.js to the exclusion string has the worst-case scenario of a single JS file being excluded from the autoptimize bundle.
I’m going to post this reply to the handful of other topics related to the WP5.6 upgrade so that it’s as visible and discoverable as possible to others looking into this.