The simple question here is that I cannot find a direct answer.
Is it possible to use absolute paths for dependencies (for example, <script src="/my-script.js"></script> ) with the electron and work?
Currently it just does mainWindow.loadURL('file://' + __dirname + '/index.html');
What loads index.html is just fine, but here's the thing, index.html loads
Which fails because it looks at the root of the entire hard drive
This will simplify my life, because otherwise I would have to reorganize a bunch of URLs for the templates, and some of them would forever break my application if I ever wanted to add pages to a subdirectory of a website (for example, http: //website.com/m/ ).
Any suggestions? Thanks!
source share