RequireWP Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
This plugin extends the WP_Scripts class, adding some additional methods and filters that overload the existing script output to add Require.js syntax. It loads scripts via Require.js and by default defers until the DOMContentLoaded event fires (unless a manually added require() is called within the head/body and does not wait for the DOM to be loaded.
It is designed to work in conjunction with HTTP/2 but will function fine without it (though you may see slower load times).
This plugin is design to assist developers in updating and creating JavaScript that is asynchronous – that is, scripts that can load in a different order and do not assume that their dependencies are available immediately. Use of the Asynchronous Module Definition (AMD) allows a script to define it’s dependencies and have them loaded asynchronously prior to the entire script or the initialization portion executes.
It is common for larger projects to concatenate together scripts however, they can end up a jumbled mess and smaller required functions are often duplicated (and redundant) across multiple scripts. HTTP/2 corrects this by allowing multiple resource files to be requested and downloaded within a single TCP window. As projects get larger and more diverse it is becoming more economical to load the individual components (modules) that are needed rather than download and execute one massive concatenated script file (which can also cause the browser to freeze up).
NOTE: This plugin currently only replaces non-administrative (front-end) scripts with Require.js syntax.
Plugin website: https://techie-jim.net/wordpress-plugins/requirewp/
Screenshots
No screenshots provided