I was wondering whether it is possible somehow to register a javascript var for a certain resource loader module in php? There is the OuputPage::addJsConfigVars function but I didn't find anything to only load a var only conditionally when a module is loaded. Right now I am registering a variable in the ResourceLoaderGetConfigVars hook, but actually, I only want to have it included when the 'wikibase' module is loaded since it is rather big and shouldn't be loaded when not necessary.