I ran into one issue I wanted to document in case anyone else ran into it too. When building I was getting a blank screen and it took me awhile to figure out why. In electron.js I changed:
win.loadURL(
isDev
? "localhost:3000"
: file://${path.join(__dirname, "../build/index.html")}
);
Apparently this happens when you skip the "homepage":"./" bit in the tutorial. Honestly after days and days of exploring vite-electron, electron react boilerplate, etc this tutorial was the most helpful to me. Not forgetting the sister tutorial on electron sqlite. Thank you @mandiwise ...in 2024!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Very helpful thank you!
I ran into one issue I wanted to document in case anyone else ran into it too. When building I was getting a blank screen and it took me awhile to figure out why. In electron.js I changed:
win.loadURL(
isDev
? "localhost:3000"
:
file://${path.join(__dirname, "../build/index.html")}
);
to
win.loadURL(
isDev
? "localhost:3000"
:
file://${path.join(__dirname, "/../build/index.html")}
);
and it was able to launch my app correctly!
Apparently this happens when you skip the "homepage":"./" bit in the tutorial. Honestly after days and days of exploring vite-electron, electron react boilerplate, etc this tutorial was the most helpful to me. Not forgetting the sister tutorial on electron sqlite. Thank you @mandiwise ...in 2024!