title: Electron Forge - Can't use ipcRenderer in the renderer file
body: <p>I just created a new application using the following command:</p>
  
  <pre><code>npx create-electron-app my-new-app --template=typescript-webpack
  </code></pre>
  
  <p>Inside the <strong>renderer.ts</strong> I added the following code</p>
  
  <pre><code>import "./index.css";
  import { ipcRenderer } from "electron";
  </code></pre>
  
  <p>But when I run <strong>npm run start</strong> I have the following error in Browser Console</p>
  
  <pre><code>Uncaught ReferenceError: require is not defined
  </code></pre>
  
  <p><strong>Update</strong>
  What I've tried:</p>
  
  <p><strong>webpack.plugins.js</strong></p>
  
  <pre><code>const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
  const webpack = require("webpack");
  module.exports = [
    new ForkTsCheckerWebpackPlugin(),
    new webpack.ExternalsPlugin("commonjs", ["electron"]),
  ];
  </code></pre>
  
  <p>But it still doesn't work.</p>