Home Forums Gutenberg Beta 4 enqueues admin scripts on frontend


Beta 4 enqueues admin scripts on frontend

    • joshf

    • March 15, 2019 at 8:21 am

    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?

    • hallipa

    • March 16, 2019 at 4:57 am

    Same here. And joshf’s solution fixes it.

    • joshf

    • March 16, 2019 at 10:06 am

    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)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.