Closed tommi-hack closed 3 years ago
@tommi-hack check out this issue it may fix your problem
@asticode this is awesome, thank you so much. I did spend quite a lot of time trying to get this working. I think it would be super beneficial to add this information to Readme. Maybe something like that:
All paths in html / javascript must be relative, otherwise the files will not be found. To make this happen in React for example, you just need to set the homepage property of your package json to "./".
{ "homepage": "./" }
I think this would be a good idea indeed. Do you feel like making a PR for this?
I would gladly do a PR but now sure how. It seems I can't push new branch here. I haven't contributed to public repositories before. From some sources I read that I should fork this repository before making my changes but they are a bit contradicting. If you have a good manual to point how can one submit a PR then it would be nice.
Here are a few links that will help you:
Basically you have to fork the project, create a new branch on your local copy, make the proper changes in the code for the PR, push your branch, and create a PR from your branch in github.
PR created, thank you for the hints!
Simple example. I have index.html including tag in example below, and "a.png" in the same folder. Here "a.png" is not found because it has slash in the beginning of path. Without the slash it works.
This would not be a problem for manually written html but React toolchain makes all includes and paths absolute and it makes impossible to use React with go-astilectron.
Proposal: Go-astilectron could internally remove the slash from the begining of path.