Skip to content

Instantly share code, notes, and snippets.

@gnopor
Last active May 23, 2020 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnopor/d4813628c949294c4ef8b4ef88941f68 to your computer and use it in GitHub Desktop.
Save gnopor/d4813628c949294c4ef8b4ef88941f68 to your computer and use it in GitHub Desktop.
Use this to fix on bug Ionic base React app with electron white / blank page
Solved: fix bug Ionic base React app with electron white / blank page
Note: For launch the app with electron, follow these steps:(forgive my English I am native french speaker)
1. First of all forget about the electron folder, do not touch it.
2. In your react/ionic directory which is your root directory for the app,add the following in your package.json file: "homepage": "./"
3. Now from your react/ionic directory which is your root directory for the app, navigate to the "public" directory and update your index.html file replacing <base href="/" /> with: <base href="./" />
4. Now run the following command and that is it...
a. ionic build && npx cap copy
b. npx cap open electron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment