generator-solid-react
generator-solid-react copied to clipboard
[QUESTION] Where should we set the "base" for the generated app
My team is trying to deploy an app based on this with GHPages. The app is not able to load any resource apart from the index.html and I suspect the reason is that we lack a "base" element.
Here is the discussion in the solid forum and this comment describes how to (hopefully) fix it.
The general problem was that currently the app is expected to be hosted in the root folder and breaks if this is not the case (e.g. on GH pages).
My suggestion is to make all paths relative were possible. In particular I've suggested following (for the forked app, not sure if all of these apply to the generator too):
- only use
homepage: .in package.json and removed other specs of the hosting destination - make image urls relative (
/img/...->img/...) - make translation url relative (used the loadPath setting of the xhr-backend for that)
I don't know if this fixes all issues or breaks other things, but I hope this input is of value for you.