Monorepo - to get images inside packages on the root (react native)

Viewed 275

I'm having an issue getting the images of a package with yarn monorepo with React Native.

I import the image on my package but when I going to use the package on the component of the root project, the image path doesn't resolve.

For example:

monorepoproject
 | front
 | packages
   | mypackage
     | assets/image-test.jpg

<Image source={require("@mypackage/assets/image-test.jpg")} />

It's necessary doing something more to fix this issue? The error is: "GET /packages/mypackage/assets/image-test.jpg HTTP/1.1" 404 194 "-" "-"-

0 Answers
Related