Reputation: 11
If I modify Libraries/Image/resolveAssetSource.js
something like below
function assetToImageSource(asset): ResolvedAssetSource {
var devServerURL = getDevServerURL();
if(devServerURL){
console.log("devServerURL:"+getPathOnDevserver(devServerURL, asset));
}else{
console.log("PathInArchive:"+getPathInArchive(asset));
}
return {
__packager_asset: true,
width: asset.width,
height: asset.height,
uri: devServerURL ? getPathOnDevserver(devServerURL, asset) : getPathInArchive(asset),
scale: pickScale(asset.scales, PixelRatio.get()),
};
}
How to rebuild or recompile Libraries ? and then I can see the console log from resolveAssetSource.js
Upvotes: 1
Views: 13740
Reputation: 1212
You don't need rebuild them, react-native packager will do that. Just stop the packager and restart it. (Maybe you need clean cache)
Upvotes: 3