DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Ahmed Malik
Ahmed Malik

Posted on

React native path issue from assets

I have a react-native project and in the assets folder there is a model.glb file that needs to be accessed by Model.js which is not in the assets folder. I thought

import newModel as ./assets/model.glb

would work but I get an error that it can't be found

Top comments (1)

Collapse
 
drzaln profile image
Doddy Rizal Novianto

import newModel from "./assets/model.glb"

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.