Getting Started
#
Installation into an existing Capacitor application.Note: these instructions require a Capacitor version of ^3.2.0
- Build your webapp in your capacitor initiated project ('npm run build' for example).
- Run
npm i @capacitor-community/electron
in your webapp project directory. This will install the platform for use with the@capacitor/cli
. - Run
npx cap add @capacitor-community/electron
to initiate the platform, this will create theelectron
folder in your webapp project. - Run
npx cap open @capacitor-community/electron
to start your app in electron.
Note: You can use other npx cap
commands with the platform by: npx cap <command> @capacitor-community/electron
#
Changing the default configurationIn the *yourAppDir*/electron/src/index.ts
you can edit anything you'd like, with V4 a lot of what was hidden in V2 from developers is now exposed to tinker with (or not if you dont want to). However most configuration is done in one of the following files in your apps main directory: capacitor.config.json
, capacitor.config.js
, or capacitor.config.ts
. Please see config options page for details.