title: Electronjs window.require not a function
body: <p>I'm using create-react-app (react-scripts v3.0.0) and electronjs (v5.0.1). I'm trying to pass events from the renderer to main process using the 'icpMain' module <a href="https://electronjs.org/docs/api/ipc-main" rel="noreferrer">as described here</a>, but get the error <code>window.require</code> is not a function for the line </p>
  
  <pre><code>const { ipcRenderer } = window.require('electron');
  </code></pre>
  
  <p>How can I get <code>require</code> into the global scope in the renderer process? Or is there another way of communicating between the main and renderer process? </p>
  
  <p>Edit: </p>
  
  <p>I've tried removing the react build entirely and get the same results simply using the electron example code in index.html. </p>