JavaScript for WordPress Forums Gutenberg Development Integrate ESNext in theme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #40016
    David Perez

    I’m building blocks for a theme, and I found that ESNext is not supported, what do we have to build to make it work?


    Zac Gordon

    Hi there!

    Couple of things:

    1. Your blocks should go in a plugin, not the theme. You can bundle the theme to require the plugin tho
    2. If you use webpack and babel all your JavaScript will be compiled into valid JS that should work in most modern browsers and you can set your fallback further if you want.

    Hope that helps! Please let me know if not 🙂

    David Perez

    Thanks Zac! I’ll check it out…

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.