If it’s not a real production build, you probably test your React Apps in a sub folder at your hosting space. The information on this is scattered and explained way too difficult. There’s nothing to it:
- Open package.json in uour App root folder
- Find the parameter “homepage” or add it (image above)
- Give the parameter the value of the complete path where your app will be hosted (image above)
- Save the package.json file
- Build the React app using npm start build
- Upload the production build (folder build) to your hosting provider
- And done!
And when you are building the React App using npm run build, it should confirm the subfolder: