This is a bit of minor tech debt to simplify the code and use newer ResourceLoader mechanisms.
Follows-up: T127275: Wikibase RL module mw.config.values.wbSiteDetails repeatedly flapping.
I attempted this previously with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/496622/, but this led to a regression (T219452). This task is placeholder for:
- Figuring out what went wrong.
- Improve the tests.
- Do it again :)