Backend script is being loaded on frontend
-
It seems that right now backend editor script with the handle “wcpcsup-gutenberg-js” is being loaded on frontend. This is really bad for loading times because it depends on the following scripts: ‘wp-block-editor’, ‘wp-blocks’, ‘wp-components’, ‘wp-element’, ‘wp-i18n’, ‘wp-server-side-render’. And they in turn depend on even more scripts. As a result, a total of 43 extra scripts are being loaded.
For now the temporary solution is:
// Disable backend script on frontend
add_action('wp_enqueue_scripts', function () {
if (is_admin()) return;
wp_dequeue_script('wcpcsup-gutenberg-js');
});
- You must be logged in to reply to this topic.