I'm building a React Native app with Expo with web support. I plan to host the web version on a website in a subfolder, e.g.
http://somewebsite/myapp/
I build the web version with Metro bundler, using this command:
npx expo export -p web
Then, I upload files from the dist
dir to the myapp
folder on the website. However, the app doesn't start, and shows this error in console:
http://somewebsite/bundles/web-cba49510376d833ebedca732d1e69545.js 404 Not Found
I tried setting projectRoot
in metro.config.js
. That didn't have any effect.
How can I tell the Metro bundler to look for files in http://somewebsite/myapp/
instead?