Support

Account

Home Forums Gutenberg Beta 4 enqueues admin scripts on frontend

Solving

Beta 4 enqueues admin scripts on frontend

  • Beta 4 is enqueuing twenty-ish admin scripts (React, lodash, etc) in the client frontend (screenshot attached). This can be remedied with wp_dequeue_script('acf-blocks');.

    This issue does not appear in beta 3.

  • I just came here to post about this. I’m really hoping that this won’t appear in the stable 5.8. This is an absolute no-go for me as a speed optimization freak. Does anyone have more insight about this? Good on joshf on figuring out how to dequeue it already, but perhaps it’s needed for the development team in the time being?

  • Same here. And joshf’s solution fixes it.

  • Elliot replied to the issue on Github:

    This issue is due to a change we made in beta-4 which enqueues out JS in the “enqueue_block_assets” action. This seems to also be run on the front-end and explains why all the WP blocks JS is being enqueued.

    The fix for this issue is to change “enqueue_block_assets” to “enqueue_block_editor_assets” in the “/pro/blocks.php” file on line 383.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Beta 4 enqueues admin scripts on frontend’ is closed to new replies.