### Frontend
mw.loader is naturally quite separate from other MediaWiki JS modules. Mainly, because it has to - it's the first thing that loads.
* [ ] Implement an abstraction for mw.loader (e.g. factory function or class). This allows MW-specific config to be injected, e.g. where `load.php` is.
* [ ] ???
### Backend
When ResourceLoader was first written, and shortly before this task was filed, it was mostly MW-agnostic.
Having said that, a few things have crept in over the years.
* [x] {icon check} Use of MW `cacheEpoch`. This is no longer useful. Remove. – <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/460462/>
* [x] {icon check} Use of WebRequest GPC normalisation. This was unintentional (we didn't have getRawVal yet in 2010). Remove. <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/313222/>
* [x] {icon check} Use of FormatJson. No longer needed with our PHP requirements. Remove. <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/453194/>
* [ ] Use of `Xml::encodeJsCall`. Pretty trivial. Create a simplified version as private utility method instead.
* [ ] `ResourceLoader::__construct()` hardcodes stuff for MediaWiki modules for MediaWiki.
** [x] {icon check} Create service writing for ResourceLoader. – <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/491018/>
** [x] Move registration of modules and module sources to MediaWiki service wiring.
** [x] Move the hooks and calls to `addSource()` and `register()` to MediaWiki service wiring.
** [x] Deprecate the implicit Config object used from MediaWikiServices. (MW 1.34)
** [ ] Remove default for Config constructor parameter. (MW 1.35)
* [ ] ...
* [ ] ???
* [ ] ...
>>! Original task description
> Just like the backend, the front-end should be less tied into MediaWiki base as well.
>
> It sounds more complicated than it really is though. All we need to do is move mw.loader into a separate file and create an instance of it in mw.loader.
>
> It's already an object constructor, except that right now it is instantly-instantiating an anonymous object constructor (this.loader = new (function(){ ... }));