Support

Account

Home Forums Gutenberg How to make Custom Block load JS file only in the editor

Unread

How to make Custom Block load JS file only in the editor

    • city17

    • September 8, 2019 at 12:48 am

    Hi, I’m working a custom block where I want to have separate files Script files for the front-end and editor.

    I found that when making a completely custom block you can use the 'enqueue_block_editor_assets‘ hook, but I’m not sure how to apply this to ACF’s way of creating custom blocks.

    It seems like with ACF only enqueue script and enqueue style are supported, which always load the same file for the editor and the front-end.

    Is there a way to make this (or some other method) work with ACF custom blocks?

Viewing 1 post (of 1 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.