I have classic web application rendered on server. I want to create admin panel as single page application in React. I want to server admin panel from https://smyapp.example
For create-react-app v2 and react-router v4, I used the following combo to serve a production (staging, uat, etc) app under "/app":
package.json:
"homepage": "/app"
Then in the app entry point:
{/* other components */}
And everything "just works" across both local-dev and deployed environments. HTH!