generator-solid-react icon indicating copy to clipboard operation
generator-solid-react copied to clipboard

[QUESTION] Where should we set the "base" for the generated app

Open Victor-Gon opened this issue 5 years ago • 1 comments

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.

Victor-Gon avatar Mar 12 '20 17:03 Victor-Gon

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.

Otto-AA avatar Mar 17 '20 13:03 Otto-AA