title: How to route in electron react app during production
body: <p>I am using electron 6.10.0 and using React.js. </p>
  
  <p>In my app, there is an add task option in menu, which creates a new window.</p>
  
  <p>Everything works fine during development, but during production this line causes problem.</p>
  
  <p><code>addWindow.loadURL(isDev ? 'http://localhost:3000/add' : `file://${path.join(__dirname, '../build/index.html')}`);</code></p>
  
  <p>It loads index.html, through which it loads index.js and which renders router.js. This is the code in Router.js.</p>
  
  <pre><code>&lt;HashRouter&gt;
      &lt;Switch&gt;
        &lt;Route exact path="/" component={App} /&gt;
        &lt;Route exact path="/add" component={addWindow} /&gt;
      &lt;/Switch&gt;
    &lt;/HashRouter&gt;
  </code></pre>
  
  <p>Mainwindow works fine because the hash is ' / ' but for add window the hash doesn't change and it loads the mainwindow content again in addwindow.</p>
  
  <p>How to use the route/Router during production, or is there any other way around.</p>
  
  <p>Thanks in advance.</p>