solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Trouble deploying a static site to a domain subfolder

Open viridia opened this issue 2 years ago • 1 comments

I am having trouble trying to deploy a static site to github pages. Because github locates the pages until a subdirectory in the url, I need to set the "base" location - I can do this in Vite with the base option, but when I attempt to do the same to the solid "Routes" component things go haywire. I get "Unrecoverable Hydration Mismatch".

(Not setting the base option in the Routes means that navigation links go to the root folder, which 404s because there is no page there.)

viridia avatar Dec 04 '22 19:12 viridia

Reproduction should be relatively simple: take any working solid-start project and make two changes:

Add base: /xxx/ to vite.config.js.

Add base="xxx" to the <Routes> component in root.tsx.

Now, run npm run dev and try to load the site. Make sure you add the /xxx/ to the url path.

viridia avatar Dec 05 '22 05:12 viridia

https://github.com/solidjs/solid-start/pull/742 may fix this issue related: https://github.com/solidjs/solid-start/issues/397

LiQuidProQuo avatar Feb 16 '23 19:02 LiQuidProQuo

I have documented the process.

atk avatar Feb 17 '23 04:02 atk

In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed in mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.

ryansolid avatar Dec 18 '23 23:12 ryansolid