⚡️ From React to an Electron app ready for production

Just … don’t ask

The development version

create-react-app appyarn add electron electron-builder wait-on concurrently --devyarn add electron-is-dev
"main": "public/electron.js"
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\""
Fun stuff!

The big question is: How the hell do I package and ship this app now?!

"build": {
"appId": "com.example.electron-cra",
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories":{
"buildResources": "assets"
}
}
"electron-pack": "build --em.main=build/electron.js"
"preelectron-pack": "yarn build"
"author": "Captain Electron"

"homepage": "./"
It.. It’s beautiful 😢

Final notes

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store