pateketrueke / yrv

Your routing vibes! (for Svelte)
https://svelte.dev/repl/0f07c6134b16432591a9a3a0095a80de
161 stars 9 forks source link

Route with id param messes up stylesheet. #53

Closed AndreasHald closed 4 years ago

AndreasHald commented 4 years ago

Hi i've been using this router to get to know Svelte, and so far all good.

But when i got to creating a route with an id parameter, refreshing the page on that route causes the app to look for the stylesheet in the wrong place.

Screenshot 2020-09-08 at 15 54 58

Screenshot 2020-09-08 at 15 55 19

instead of looking for index.css in localhost:4200/index.css like all other routes, this one for some reason attempt to look in a nested folder.

Thus if i navigate around, starting somewhere else, no problem. But if i refresh the page on http:localhost:4200/report/1234 it won't find the stylesheet.

Any ideas?

Index.html for reference

Screenshot 2020-09-08 at 16 00 58

pateketrueke commented 4 years ago

You can try:

AndreasHald commented 4 years ago

This actually had nothing to do with yrv.

It was caused to a relative path to index.css as you correctly pointed out @pateketrueke, i fixed it by having tailwind compile to another file in the build directory and link to that instead.

Sorry for opening this issue, closing again.