Thus begins the technical part of MobileFrontend's webpack adventure. We need to setup the foundations of the next few quarters of work... exciting!
= Precursors
[] T197639 has been completed.
[] Tech lead (or substitute) has reviewed and amended this card to reflect output.
[] Existing code coverage is documented on mediawiki.org project page
= Plan
Based on the initial exploratory work (https://gerrit.wikimedia.org/r/406782) and hopefully confirmed by T197639, we will begin by porting the ModuleLoader and its test to webpack.
= Acceptance criteria
[] Does MobileFrontend have a working version of webpack?
[] Does the resulting code get bundled into the mobile.startup module?
[] Is the ModuleLoader working in headless node-qunit?
[] Is MobileFrontend working just as it did before?
[] Is one copy of oo-js being loaded (the one inside core?)
= Developer notes
Although longterm we may not need the ModuleLoader which provides M.define and M.require functionality, we will need to keep it around during the port given many things depend on it. There's a great irony in porting a ModuleLoader to a system where one of the benefits allows module loading. Enjoy.
Note, the POC loaded oojs from npm. Don't do that as we'll be shipping 2 copies of OOjs.
Note, the POC uses webpack 3. Webpack 4 makes more sense now. Let's start of as shiny as possible.