Webpack + Typescript

Create a new Electron app with webpack and TypeScript.

To get you up and running as fast as possible with TypeScript and webpack, we provide a template that makes use of the @electron-forge/plugin-webpack module with sane TypeScript configuration defaults.

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

There have been reports that using the Git Bash command line on Windows specifically with this template will prevent the Electron app from rendering (packaged apps are fine). We recommend that on Windows, you use CMD.exe, PowerShell, or WSL2.

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.

Last updated