Hello
I'm using the Sun react-router in my application and everything works normally when squeeze with npm start. But when I run npm run build and open the application on a server, the routes do not work. Clicking on a link gives "page not found".
My Router:
<BrowserRouter>
<div style={{width: '100%', height: '100%'}}>
<Switch>
<Route path='/' exact component={Login}/>
<Route path='/painel/' component={PainelPrincipal}/>
</Switch>
</div>
</BrowserRouter>
My link on the Login page:
<a href={'/painel'}>
<button className="btn btn-primary btn-block">Entrar</button>
</a>
Can anyone tell me what's going on?