Closed janhartmann closed 7 years ago
Hi. It seems the same (or similar) issue was raised here - https://github.com/react-boilerplate/react-boilerplate/issues/488
I assumed by production you mean your Electron app main process window URL is set to a path to a local HTML file using the file:// protocol. If that is the case, Electron app will not work with React Router using browserHistory. I think you can try changing React Router from using browserHistory to hashHistory, and then it will work fine.
More info about the history JS library is here.
I hope that helps.
@janhartmann, did you ever figure this one out? I have a very similar setup with the same results <- also my first Electron build.
@cedrickchee It's worked for me. Thank you sir
This is my first ever Electron application, so I might have overseen something entirely obvious.
I have made a React application, using Babel and bundled with Webpack3. I am trying to use
electron-builder
for creating my production application. I am first and foremost completely new to Electron, so I am even unsure on how to debug the running production application.The issue is, that once I have installed the application, the main window is just the background color of the window - no application is embedded, I can only see the window - no alerts.
My folder structure:
My build steps is:
yarn build
which bundles files into./dist/
:yarn pack
whichs runselectron-builder
and builds the files into./release/
My configurations is as follows:
This is the
webpack.config.prod.js
file:This is the
main.js
file in the root of my directory (outside./src/
):I am unsure why this is not working, and I hope the community have some great advices to get me running! Let me know if anything is needed more than this.
Kind regards, Jan