[ReactNative] Copy assets to corresponding folders on Android
This commit is contained in:
parent
d548c85da6
commit
d723e17629
|
@ -175,7 +175,7 @@ describe('resolveAssetSource', () => {
|
|||
isStatic: true,
|
||||
width: 100,
|
||||
height: 200,
|
||||
uri: 'assets_awesomemodule_subdir_logo1_',
|
||||
uri: 'awesomemodule_subdir_logo1_',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -50,7 +50,8 @@ function getPathInArchive(asset) {
|
|||
return (assetDir + '/' + asset.name)
|
||||
.toLowerCase()
|
||||
.replace(/\//g, '_') // Encode folder structure in file name
|
||||
.replace(/([^a-z0-9_])/g, ''); // Remove illegal chars
|
||||
.replace(/([^a-z0-9_])/g, '') // Remove illegal chars
|
||||
.replace(/^assets_/, ''); // Remove "assets_" prefix
|
||||
} else {
|
||||
// E.g. 'assets/AwesomeModule/icon@2x.png'
|
||||
return getScaledAssetPath(asset);
|
||||
|
|
Loading…
Reference in New Issue