User Story
To aid the MobileFrontend refactor, we will want to clean up how JavaScript is organised in Minerva.
Currently our modules in Minerva are arranged by feature AND context (e.g. is tablet). We want to arrange them by page (e.g userpage, standard page, special page).
For instance if the user cannot watch a certain page we currently do not load the module skins.minerva.watchstar
After discussing this as a team we concluded that we would prefer to group these by page and move this logic into frontend code. This will mean more JS is loaded by default, but there will be less fragmentation across pages.
Acceptance Criteria
- Add webpack to Minerva.
- Add a new entry point to webpack - skins.minerva.page - this should load the code inside skins.minerva.scripts and any Minerva dependencies.
- Ensure if skins.minerva.scripts is loaded the new entry point skins.minerva.page is loaded so that we do not run into any caching issues.
Sign off steps
- The remaining work revolves around deprecating the getContextSpecificModules module. Next step would be to create a card to clean that up.