Manual:$wgResourceModules

Details
By default modules are registered as an instance of ResourceLoaderFileModule. Documented below:

Base path Base path Base path File path string or array of file path strings. Array keyed by language code containing file path string or array of file path strings. Array keyed by skin name containing file path string or array of file path strings. File path string or array of file path strings. File path string or array of file path strings. Module name string or array of module name strings. File path string or array of file path strings. Array keyed by skin name containing file path string or array of file path strings. Array of message key strings. Group name string. bottom' (default) or 'top'.
 * localBasePath: Base path to prepend to all local paths in $options. Defaults to $IP.
 * remoteBasePath: Base path to prepend to all remote paths in $options. Defaults to.
 * remoteExtPath: Equivalent of remoteBasePath, but relative to.
 * scripts: Scripts to always include.
 * languageScripts: Scripts to include in specific language contexts.
 * skinScripts: Scripts to include in specific skin contexts.
 * debugScripts: Scripts to include in debug contexts.
 * loaderScripts: Scripts to include in the startup module.
 * dependencies: Modules which must be loaded before this module.
 * styles: Styles to always load.
 * skinStyles: Styles to include in specific skin contexts.
 * messages: Messages to always load
 * group: Group which this module should be loaded together with
 * position: Position on the page to load this module at.

Examples
Here's a basic example for usage in an extension. You'd put this in the main php file like

The above example will create a module called ' ', that includes /extensions/MyExtensions/modules/myExtension.js and. And also ensures two modules ' ' and ' ' are available before execution.


 * Advanced example in Extension:Vector

Loading module
See also ResourceLoader/Migration_guide_(developers):