vite-template-react-cordova-electron

Uses Vite, Vitest, and React Testing Library to create a modern React app compatible with Create React App, on top of the Apache Cordova cross-platform framework with a pre-added Electron platform for desktop deployment.

This setup allows for a quick and effortless deployment of your React web app to the Electron desktop wrapper. You may also add any other platform, such as Android or iOS, using Cordova.

npx degit https://github.com/Polarts/vite-template-react-cordova-electron.git my-app

Setup

  1. npm install
  2. cordova prepare

Scripts

  • dev/start - start dev server and open browser
  • build - build for production
  • preview - locally preview production build
  • test - launch test runner
  • electron - lauch electron without building

Inspiration