-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing files outside project directory does not work #269
Comments
Hi! Metro has a config param where you can define folders that are outside of your Closing the issue, please reopen if this does not solve it 😃 |
this doesn't work for me, I have the same project structure and when I import a js file it works perfectly but now if I import anything that isn't a .js (like png, svg, jpg) file it breaks, it doesn't display any error but just doesn't show the image. If put them within the project root then it works perfectly. please let me know if you need further details |
@ivan-jorge001 I would recommend reproducing the bug in a minimal repository if this is important to you. |
@rafeca looks like this does not work with Here it is for your convenience: https://github.com/marioharper/metro-image-load-bug |
My folder structure is this:
Lib is shared between many projects
Inside App.js
Import lib from ../Lib/lib;
Currently metro has issue with symlinks in node_modules folder, so I thought why not include shared library using relative path, but this does not work either
In the end, I solved this issue by copying Lib dir to RN project dir, and importing from './Lib/lib' but this is not ideal solution.
OS: Windows 10
The text was updated successfully, but these errors were encountered: