MediaWiki Vue SFCs sometimes load ResourceLoader module package files with code like
const pageReady = require( 'mediawiki.page.ready' );
When testing such code using Jest, it would be nice if this magically worked instead of failing with an error. Jest optionally mocks external dependencies, but it can't do that unless it can load the external dependency. It needs the actual module so that it knows what shape to mock.
It's possible to work around the error by creating a file like __mocks__/mediawiki.page.ready.js, but this is a poor substitute for making Jest actually be aware of what file it is supposed to be loading.
A custom resolver would probably be able to do the job.
Server generated JSON config would still need to be mocked. I just want Jest to be able to load the main file of a named module. Once it has the main file, it should be able to also find what RL calls private package files, accessed using require('./file.js').