### 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)? Or find another way to inject MW-specific config (e.g. where `load.php` is mounted).
* [ ] ???
Progress:
* {d13e5b757bd9980be9ad36df6be69bfe61f1c220}
* {30ddfc8a77214cd9df75293f7d7ab008d1afad87}
* {0a8e37f042c2c3c26f14d0cb2537457e29d5ff05}
### 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} Remove use of MW `cacheEpoch`. This is no longer useful. Remove. – <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/460462/>
* [x] {icon check} Remove 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} Remove use of FormatJson. No longer needed with our PHP requirements. Remove. <https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/453194/>
* [x] Remove use of `Xml::encodeJsCall`. Instead, create a simplified version as local utility method.
* [ ] `ResourceLoader::__construct()` hardcodes stuff 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)
** [ ] Remove use of WebRequest, accept a simple array instead.
* [ ] ...
* [ ] ???
* [ ] ...
>>! 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(){ ... }));