You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the electron-react-boilerplate to build an Electron app that opens multiple windows. Each window is supposed to render a different route (e.g., /, /newtable, etc.).
In development mode, everything works fine, and all routes are displayed correctly. However, in the packaged app, only the root route (/) renders as expected. Any other route, such as /newtable, shows a blank screen.
Steps to Reproduce:
Use electron-react-boilerplate to create an Electron app.
Configure the app to open multiple windows with different routes.
Package the app using the provided packaging scripts.
Open the packaged app and navigate to a non-root route (e.g., /newtable).
Expected Behavior:
Each route should render correctly in its respective window.
Actual Behavior:
Only the root route (/) is rendered. Non-root routes display a blank screen. In case I replaced MemoryRouter with BrowserRouter, it is working fine in development mode for all routes but not in packaged app even for (/).
Additional Information:
Electron version: 31.3.0
React version: 18.2.0
Node version: 20.17.0
OS: macOS ( I haven't tested with window)
Question:
What changes can I make to ensure all routes render correctly in the packaged app?
Issue Description:
I am using the electron-react-boilerplate to build an Electron app that opens multiple windows. Each window is supposed to render a different route (e.g., /, /newtable, etc.).
In development mode, everything works fine, and all routes are displayed correctly. However, in the packaged app, only the root route (/) renders as expected. Any other route, such as /newtable, shows a blank screen.
Steps to Reproduce:
Expected Behavior:
Each route should render correctly in its respective window.
Actual Behavior:
Only the root route (/) is rendered. Non-root routes display a blank screen.
In case I replaced MemoryRouter with BrowserRouter, it is working fine in development mode for all routes but not in packaged app even for (/).
Additional Information:
Question:
What changes can I make to ensure all routes render correctly in the packaged app?
Below is my code
App.tsx
main.ts
I have added below code to main.ts
preload.ts
Updated preload.ts
Thank you for your help!
The text was updated successfully, but these errors were encountered: