| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x 1x 1452x 3x 1449x | /*
Thanks to @zhaotai and @miracle2k for this!
https://github.com/RealOrangeOne/react-native-mock/issues/11#issuecomment-230435835s
*/
const m = require('module');
const originalLoader = m._load;
m._load = function hookedLoader(request, parent, isMain) {
if (request.match(/.jpeg|.jpg|.png$/)) {
return { uri: request };
}
return originalLoader(request, parent, isMain);
};
|