metro-with-symlinks
metro-with-symlinks copied to clipboard
Asset paths invalid for symlink packages on metro@^0.47
Hi @MrLoh ,
I got an issue on RN 0.57.2 that asset paths from symlink packages cannot be resolved correctly. I think its related to this issue
Here's the repo to reproduce this issue: https://github.com/adrianha/metro-symlink - Works fine react-native: 0.57.1
https://github.com/adrianha/metro-symlink/tree/0.57.2 - Assets path incorrect react-native: 0.57.2
Any suggestion?
I suspect this is an issue in metro and can't be fixed using metro options. The only relevant options are around asset transformation and I think configuring those will suffer from the same issue since there doesn't seem to be a granular way to configure the httpServerLocation
.
I’m not on RN 0.57 yet, so can’t say much. I’ll check once we upgrade, but it might still take a while. Sorry
rn-cli.config.js
was renamed to metro.config.js
@treyp can you confirm that your this was fixed in #18?
yep, symlinks are working fine for me again. i'm using [email protected]
with [email protected]
(just published).
i'd suggest trying RN >= 0.59. they were broken for me in 0.57.2 and 0.58.
Sorry, that comment was based on my usage of RN 0.59 in iOS only.
I've tried using Android and the issue still exists there. However, I don't think it's something that can be solved with metro config options, so I don't see a path forward for this repo.
Best thing I can suggest is to monitor https://github.com/facebook/metro/issues/290
I'm reopening this for transparency then, since it's not fully solved yet.