-
Notifications
You must be signed in to change notification settings - Fork 904
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
Including source code from outside root project #639
Comments
You'll need to configure Metro bundler using |
Thank you for pointing to metro.config.js. I would not even think to look there. And if I set projectRoot to the shared directory (rn.common) then nothing else works (as it cannot find index.android.js) and so on. |
Looks like you could find some help on Metro issue tracker: |
Thank you for the pointers!. I was looking at those as well. The part where they showed how to use metro resolver to 'expose' all the node_modules in root dir Thank you for your help, at any rate, it seems that I need to chase the whole problem->solution with metro folks. |
After finding no way to solve this I ended up using gulp to watch external modules and copy them into node_modules of my RN app. |
Having difficulties figuring out how to include js source code from outside the root project
My index.android.js has
import { functionX} from './../rn.common/src/js.app/SomeFunctionsThatUseRN'
The above, unfortunately causes an error.
I saw how to solve it with
getProjectRoots of the old rn-cli.config.js.
However, I could not find in migration docs, of how to do this with react-native-community/cli
So I tried what I thought might work (below)... but no success.
The text was updated successfully, but these errors were encountered: