I have a web app created with React. I want to create the desktop version of that app. To do that, i added electron.js file in the public folder. Inside the electron.js file is the basic electron code that take index.html and turn it to a desktop app that looked like this:
const { app, BrowserWindow } = require('electron')
const path = require("path");
const isDev = require("electron-is-dev");
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
})
win.loadURL(isDev ? "http://localhost:3000" : `file://${path.join(__dirname, "../build/index.html")}`);
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
The app is works and I don't add any electron code to the src folder. How can i get the executable for Windows, Mac, and Linux in my React-Electron code? My machine run on linux