Blank screen with IonReactRouter and Electron
See original GitHub issueDescription of the problem:
IonReactRouter does not work in Electron production builds. With Capacitor, it does not work whatsoever. The elements are present in the markup, but they are rendered invisible. Is it possible to allow IonReactRouter to have an additional API layer over the HashRouter instead of just BrowserRouter, which does not work with Electron?
Affected platform
- Android
- iOS
- electron
- web
OS of the development machine
- Windows
- macOS
- linux
Other information:
Capacitor version: 1.1.1
node version: 10.16.3
npm version: 6.9.0
CocoaPods version: N/A
Steps to reproduce:
-
Generated boilerplate code with
ionic start ionic-electron sidemenu --capacitor --type=react
-
Set homepage in
package.json
:
{
...
"homepage": ".",
...
}
-
Created a build with
ionic build
-
Initialized Electron project with
npx cap add electron
-
Copied project contents to electron project with
npx cap copy
-
Ran app with
npx cap open electron
This issue happens with the component regardless of whether or not the project was bootstrapped with Capacitor.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:15 (2 by maintainers)
Top GitHub Comments
If you read my comment in the issue I linked, I explained how to make it work for react. Also says it’s the same issue as https://github.com/ionic-team/capacitor/issues/639, which is open. So, why I closed it? Because it’s a duplicate of a duplicate
Mm…I think that it´s similar but not the same, as for example I get no errors in the console, but I´ve the same blank screen. The other one it´s related to errors of assets linking 😉 Anyway, thanks for your fast reply 😃 I didn´t see that related issue.