title: ReactJS production build with react-router not working
body: <p>I have created simple app with <code>react-router</code> which part looks like:</p>
  
  <pre><code>                    &lt;BrowserRouter&gt;
                        &lt;Switch&gt;
                          &lt;Route
                              exact
                              path="/"
                              render={() =&gt; &lt;Redirect to="/home" /&gt;}
                          /&gt;
                          {layoutRoutes.map((prop, key) =&gt; {
                            return (
                                &lt;Route
                                    path={prop.path}
                                    component={prop.component}
                                    key={key}
                                /&gt;
                            );
                          })}
                        &lt;/Switch&gt;
                      &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>but when the app is build and deployed to the web server is rendered as a white page and not even redirecting to the <code>/home</code> component.</p>
  
  <p>The app itself was created via <code>create-react-app</code> and <code>package.json</code> looks like:</p>
  
  <pre><code>{
    "name": "front-end",
    "version": "0.1.0",
    "private": true,
    "homepage": ".",
    "dependencies": {
      "bootstrap": "^4.3.1",
      "formik": "^1.5.8",
      "react": "^16.9.0",
      "react-dom": "^16.9.0",
      "react-redux": "^7.1.1",
      "react-router-dom": "^5.0.1",
      "react-router-redux": "^4.0.8",
      "react-scripts": "3.1.1",
      "redux": "^4.0.4",
      "redux-persist": "^6.0.0",
      "redux-thunk": "^2.3.0",
      "yup": "^0.27.0"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject"
    },
    "eslintConfig": {
      "extends": "react-app"
    },
    "browserslist": {
      "production": [
        "&gt;0.2%",
        "not dead",
        "not op_mini all"
      ],
      "development": [
        "last 1 chrome version",
        "last 1 firefox version",
        "last 1 safari version"
      ]
    },
    "devDependencies": {
      "json-server": "^0.15.1"
    }
  }
  </code></pre>
  
  <p>Any clue why is working on a development environment as <code>npm start</code> but not when build and deployed?</p>