Per T194098, the more RL modules there are, the larger the startup module, the slower performance, so we want to minimise this.
MobileFrontend currently has 58 resource loader modules.
If we ignore style/image-only modules we are left with 32 modules in Mobilefrontend alone.
They are:
[] mediawiki.template.hogan *
[] mobile.categories.overlays *
[] mobile.editor.api
[] mobile.editor.common
[] mobile.editor.overlay *
[] mobile.editor.ve *
[] mobile.foreignApi
[] mobile.gallery
[] mobile.init *
[] mobile.languages.structured *
[] mobile.loggingSchemas
[] mobile.mediaViewer *
[] mobile.messageBox
[] mobile.nearby
[] mobile.notifications.overlay *
[x] mobile.pagelist.scripts
[x] mobile.references
[x] mobile.references.gateway
[] mobile.scrollEndEventEmitter
[x] mobile.search
[x] mobile.search.api
[x] mobile.search.util
[] mobile.special.mobilediff.scripts *
[] mobile.special.mobileoptions.scripts *
[] mobile.special.nearby.scripts *
[] mobile.special.uploads.scripts *
[] mobile.special.userlogin.scripts *
[] mobile.special.watchlist.scripts *
[] mobile.startup *
[] mobile.talk.overlays *
[x] mobile.toc
[x] mobile.toggle
[] mobile.watchlist
[x] mobile.watchstar
( RL modules marked with * are unlikely to be removed as part of this epic given their role as an entry point for code splitting purposes)
Many of these relate to client side code which has been working around the lack of a module loading system.
We should aim to reduce the amount of these modules. Note: the goal is **not to remove all of them**, but reduce the list as much as we possibly can.
= Acceptance criteria
[] Code relating to features is clearly identifiable and intuitive
[] Special page code e.g. mobile.special.watchlist.scripts is only loaded on the special page that needs it
[] Categories, image overlay, language talk and editor code continues to be lazy loaded and is not part of the initial webpack bundle
[] At most 16 of the initial 32 modules remain (50%) - (estimate is made by looking at dependency tree and seeing what needs what)