routify icon indicating copy to clipboard operation
routify copied to clipboard

Routify routes not working with Rollup + sirv (sirv option needed)

Open atava opened this issue 3 years ago • 2 comments

Hi all, and thanks for this library.

Installed Routify (v2) manually, adding it to an existing project. Classic setup: Svelte + Rollup + sirv.

Main index/route was working, sub-paths were not. I did everything as per the installation page.

After some two hours of tinkering and searching, I came across this SO answer. Adding the "--single" option to sirv seems to have solved the issue.

I'm writing only to let you know that this bit about Rollup/sirv is nowhere to be found in the installation docs or elsewhere. I know that Vite is what's used now, but I think any issues with the classic configuration should be addressed, being as it is very common.

Sorry if Issues was not the right place for this. Feel free to close/remove the thread in case.

atava avatar Apr 27 '22 15:04 atava

Hey, is there any docs left over from the pre-vite days that was causing you to miss the --single option? There have been a few times people have asked in the Discord in the past so it would be good to update the docs

ghostdevv avatar May 01 '22 14:05 ghostdevv

I've just rechecked the documentation searching for that option explicitly and I saw a section about it, so it's very odd that I missed it since I read the page more than once when trying to solve the issue.

Either I stumbled upon some sort of older documentation as you say or I did miss that bit. In the latter case I cannot but say that I'm sorry and that it looks very odd to me (but can't exclude it).

Thanks.

atava avatar May 02 '22 14:05 atava