title: Gitlab Pages and React Router
body: <p>I will use Gitlab Pages. It seems that Gitlab Pages doesn't work with React Router. I get an empty page. How can I use gitlab Pages with react Router?
  How can I solve this problem?</p>
  
  <p>/src/App.js</p>
  
  <pre><code>import React from 'react';
  import { Route } from 'react-router-dom';
  import HomePage from './components/pages/HomePage';
  import LoginPage from './components/pages/LoginPage';
  
  const App = () =&gt; (
    &lt;div&gt;
      &lt;Route path="/" exact component={HomePage} /&gt;
      &lt;Route path="/login" exact component={LoginPage} /&gt;
    &lt;/div&gt;
  );
  
  export default App;
  </code></pre>
  
  <p>src/index.js</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { BrowserRouter } from 'react-router-dom';
  import App from './App';
  import registerServiceWorker from './registerServiceWorker';
  
  ReactDOM.render(
    &lt;BrowserRouter&gt;
      &lt;App /&gt;
    &lt;/BrowserRouter&gt;,
    document.getElementById('root')
  );
  registerServiceWorker();
  </code></pre>