there,
I am using react-router for this app. It works fine on my local server. Here is the code:
var routes = (
<Router history={browserHistory}>
<Route path="/" component={App} />
<Route path="/concepts" component={Concepts} />
<Route path="/ssdb" component={SolarSystem} />
<Route path="/missions" component={Missions} />
</Router>
)
However, when i use webpack to deploy to firebase server, the route did not work anymore. The url says"This file does not exist and there was no index.html found in the current directory or 404.html in the root directory."
Am I missing anything? Thanks!
It turns out we need to add the rewrites to the firebase.json. Hope it helps with other people's similar issue.
"rewrites": [{
"source": "**",
"destination": "/index.html"
}]