Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.17 KB

typescript-+-webpack-template.md

File metadata and controls

27 lines (21 loc) · 1.17 KB
description
Create a new Electron app with webpack and TypeScript.

Webpack + 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.

{% tabs %} {% tab title="Yarn" %}

yarn create electron-app my-new-app --template=webpack-typescript

{% endtab %}

{% tab title="npm" %}

npm init electron-app@latest my-new-app -- --template=webpack-typescript

{% endtab %} {% endtabs %}

{% hint style="warning" %} 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. {% endhint %}

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