Manual:$wgResourceModules

Other languages:
English • ‎français • ‎polski • ‎中文 • ‎日本語
ResourceLoader: $wgResourceModules
Array of all extra defined modules that can later be loaded during the output.
Introduced in version:1.17.0 (r72349)
Removed in version:still in use
Allowed values:(multi-dimensional array)
Default value:[]

ExamplesEdit

Below is an example of how to use this in an extension. You would put this in your extension.json file.

"ResourceModules": {
    "ext.MyExtension": {
        "localBasePath": "modules/ext.MyExtension",
        "remoteExtPath": "MyExtension/modules/ext.MyExtension"
        "styles": [
            "foo.css",
            "bar.css"
        ],
        "packageFiles": [
            "index.js",
            "foo.js"
        ]
        "messages": [
            "myextension-foo-label"
        ],
        "dependencies": [
            "jquery.cookie",
            "mediawiki.util"
        ]
    }
}

OptionsEdit

See $wgResourceModules.

Loading moduleEdit

See ResourceLoader/Migration guide (developers)#Adding a module to the page :

See also