fix: create symlink to common directory (#2512)

# Summary

After changing project structure, local images stopped displaying on
Android. This is due to the fact that React Native on Android uses
okhttp for requests, which modifies the endpoint "by cleaning up the
wrong part" from
`http://10.0.2.2:8081/../common/example/assets/image.jpg`
to
`http://10.0.2.2:8081/common/example/assets/image.jpg`

A quick fix for this is to create a symlink to the common directory,
allowing images to be resolved without the `../` segment.

Special thanks to Kudo for sharing the original workaround here:
https://github.com/facebook/metro/issues/322#issuecomment-445642199.
This commit is contained in:
Jakub Grzywacz
2024-10-25 19:59:44 +02:00
committed by GitHub
parent cc527dfd49
commit 8e865a9bdb
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
../common/
+1
View File
@@ -0,0 +1 @@
../common/
+1
View File
@@ -0,0 +1 @@
../common/