Code relating to the toggle code currently lives in
mobile.languages.structured and we will move it to webpack. It is currently lazy loaded meaning we are in uncharted territory for the migration.
It is loaded here:
https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/09534b7b847ca9e60a0e1de3d67434ec2974198d/resources/skins.minerva.scripts/init.js
= Acceptance criteria
[] a conversation is had about whether we want to continue to code split by feature. Alternative approaches to consider - critical and non-critical js; load all code on startup. The conversation does not need to block implementation. At minimum we need to ensure that we do not increase the critical JS size
[] code for feature is loaded in webpack
[] tests are ported to node-qunit
[] Minerva is retained in a mergeable state throughout the migration. No need to worry about cached html but an alias module (empty module with mobile.startup dependency) will be needed until references in Minerva have been updated.
[] Critical JS has not increased
[] The bytes size of the language module has not changed considerably (e.g. we haven't loaded mobile.startup code twice)
Code:
* https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/tree/master/resources/mobile.languages.structured
= Sign off steps
[ ] [[ https://www.mediawiki.org/wiki/Reading/Web/Projects/Invest_in_the_MobileFrontend_%26_MinervaNeue_frontend_architecture/Progress?useskin=vector | Progress ]] is updated.
[] Review which features to port next and create cards.