Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 1.13 KB

File metadata and controls

17 lines (12 loc) · 1.13 KB
description Create a new Electron app with Webpack

Webpack

To get you up and running as fast as possible with the webpack bundler, we provide a template that makes use of the @electron-forge/plugin-webpack module, plus some preset webpack configuration options. This is by far the quickest way to getting a working webpack setup with Electron.

npx create-electron-app@latest my-new-app --template=webpack

Once you've initialized the template, you'll need to run npm start in the generated directory. See the Webpack Plugin documentation for Electron Forge-specific configuration options.

{% hint style="warning" %} Executing npm start immediately after creating the app will reliably produce two errors due to an issue with electronthat is currently marked as "wontfix." A temporary fix for one of the errors can be performed by commenting out line 23 (mainWindow.webContents.openDevTools()) until you have found a solution that is appropriate with your specific app. {% endhint %}