solid-start
solid-start copied to clipboard
Trouble deploying a static site to a domain subfolder
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.)
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.
https://github.com/solidjs/solid-start/pull/742 may fix this issue related: https://github.com/solidjs/solid-start/issues/397
I have documented the process.
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.