Autoptimize does not aggregate registerred-only scripts
-
Depending on a script that is only registerred and not enqued, does not work with Autoptimize’s aggregate function.
wp_register_script('script-a', '/script-a.js'), array());
wp_enqueue_script('script-b', '/script-a.js'), array('jquery', 'script-a'));In the example above script-a is missing when Autoptimize is active with aggregate (autoptimize_js_aggregate). Disabling Autoptimize or switching to defer only (autoptimize_js_defer_not_aggregate). Fixes the issue.
I don’t know which version introduced this error. We are currently using version 3.1.11.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Autoptimize does not aggregate registerred-only scripts’ is closed to new replies.