electron-userland / electron-webpack-quick-start

A bare minimum project structure to get started developing with electron-webpack.
https://webpack.electron.build/
730 stars 258 forks source link

Static assets not being loaded properly in production #107

Open KadenBiel opened 2 years ago

KadenBiel commented 2 years ago

When building my app, I noticed that I could never get my image to load after production, but while still in development the image would load just fine. I opened devTools and did some digging only to find out that whenever the app was loading in static files it used the wrong path. It would try and grab the image from /myProgram/resources/myimg.png when the actual path was /myProgram/resources/static/myimg.png. How can I rectify this? I'd like to possibly find a way to tell webpack what path to use when loading the image, but I haven't had much luck in finding one.

KadenBiel commented 2 years ago

I found a quick work around, that theoretically should work but in practice gives me nothing but issues. why can't this just work the way the docs say it should?