Skip to main content



Requirejs for Php in Wordpress Theme Development

Often we saw so many javascript file used in plugins and themes that we installed. Thinking about that, i come up with this idea to solve these;

avoid redundant load javascriptload specific javascript after those required modules are ready

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 ``.

Latest Posts

Serialize Form to Object in Typescript using Rxjs

Running native PHP in AWS Lambda

Avoid Autofill on the Woocommerce Checkout Shipping Address

Automatic Make Public on Google Cloud Storage Object

Deploy PHP App using GCP Cloud Build

Solve DEADLINE_EXCEED error while deploying app with gcloud

Ionic - Force change and refresh tab root

Start Fresh Wordpress using WP-CLI and Valet

Deploy laravel app in kubenetes locally

Improve BackpackForLaravel Save And Back Redirection