In order to use even the CSS-only version of codex icons, we need to use ResourceLoader package files to load the icons.
This is a minor rewrite which we've done many times in the past. The steps are:
- Create an "init" JS module for each RL module, list that as the first item in packageFiles.
- Export any public API in that init module.
- Protect the global namespace.
- Don't write to global mw variables.
- Refactor usages of each RL module.
Random example migration