title: React route component not rendering in production build
body: <pre><code>import React from 'react';
  import { render } from 'react-dom';
  import { BrowserRouter as Router, Route } from 'react-router-dom';
  
  import Header from './components/header';
  import Body from './components/body';
  import Archive from './components/archive';
  import Settings from './components/settings';
  
  import './assets/css/style.css';
  
  const wrapper = &lt;Router&gt;
        &lt;div&gt;
          &lt;Header/&gt;
          &lt;Route exact path="/" component={Body}/&gt;
          &lt;Route path="/archive" component={Archive}/&gt;
          &lt;Route path="/label/work" component={Settings}/&gt;
          &lt;Route path="/settings" component={Settings}/&gt;
        &lt;/div&gt;
  &lt;/Router&gt;;
  
  render(wrapper, document.getElementById('app'));
  </code></pre>
  
  <p>In above code, Body component is rendered in development mode.
  But when I run the same code in production build body component is not rendered.</p>
  
  <p>Output:</p>
  
  <p>Development Mode: Body component rendered</p>
  
  <p><a href="https://i.stack.imgur.com/hnd7C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hnd7C.png" alt="enter image description here"></a></p>
  
  <p>Production Build: Body component not rendered</p>
  
  <p><a href="https://i.stack.imgur.com/XNEGE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XNEGE.png" alt="enter image description here"></a></p>