Manual:Hooks/ResourceLoaderGetStartupModules

Details
This allows you to add modules to the startup module. This hook should be used sparingly since any module added here will be loaded on all pages. This hook is useful if you want to make code available to module loader scripts.
 * &$modules Array of module names