JavaScript for WordPress Forums Gutenberg Development Integrate ESNext in theme Reply To: Integrate ESNext in theme

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 🙂