Requirejs for Php in Wordpress Theme Development
For example, I going to develop a child-theme. I want to use `Vue`, `VueCarousel` and `jQuery.fn.modal` for my custom gallery that i build in the `/template-parts/content-product_gallery.js` which is the template block main script.
So, with this `requirejs` function. I can serve those module right from my template if those dependencies not available.
In the future, i might need to upgrade it to also help check the module version to make sure it really compatible. But for now, let's keep it simple stupid like that first.
This function included in my StrongBase theme. Let's give a try `https://goaldriven.co/strongbase`.