-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
images broken after building with electron-builder #19
Comments
I don't know how to fix this. In a quick search, I found this electron-react-boilerplate/electron-react-boilerplate#712, which describes a fix via a webpack config change. But that would require I will see if i find anything else. |
Thanks for looking into it, I'll update here if I can find a solution. I guess I could use hardcoded data-uris meanwhile for images. Also, it might be a possibility to eject only within the context of building the app with electron-builder. |
facebook/create-react-app#94 |
If your using React, Electron and react-router-dom, change your react-router-dom "BrowserRouter" to "HashRouter". |
@thalessd Thank you so much!! The switch from BrowserRouter to HashRouter solved my image issues too! |
This probably saved me sooo much time, thank you! |
Amazing man, thank u so much! |
Hello,
This may not be directly an issue with this package, but whenever I use electron-builder and build a standalone electron app (dmg file, ...) everything works great for the React piece inside Electron except for the images. I can see them both in my public directory as well as in the build/ directory. However after debugging the standalone electron app, it's attempting to load the image from
while it should probably be something like this as a prod electron, I'm assuming:
Has anyone seen this behavior as well? I'm thinking a variable in .env might be the solution here, but I'm not sure what it should be.
The text was updated successfully, but these errors were encountered: