routing does not work in vite but it does work in snowpack

This issue has been tracked since 2021-03-29.

Describe the bug

I tried porting my project from snowpack to Vite but the navigate part isn't working in the dev mode. Its working fine when I'm building and serve-ing it. Another weird thing is that when I was using snowpack only the root route (in local env) would work, but with vite I can directly go to say localhost:3000/auth/login. (Ofc in production you would serve the index.js page for the 404, and it would work). The URL changes in the address bar of my browser, but the page does not change,


I've created a repo here: Link to repo
Just clone it, run npm i and just go to localhost:3000. You'll get stuck at loading.
Expected behavior is to go to the login page.
You will see the changed url in the address bar as well.
Refreshing the page or visit localhost:3000/auth
You'll be shown a link which navigates you to homepage.
Again you'll see that the url changes and content does not, and you can verify this now by refreshing the page and seeing the new content.

System Info

latest vite.
harshmandan wrote this answer on 2021-03-29

Okay an update on this. Link works. Neither navigate not use:link works. Can you please check what's wrong?

sidharthramesh wrote this answer on 2021-05-22

Related to #204 Solution in :#200

More Details About Repo
Owner Name EmilTholin
Repo Name svelte-routing
Full Name EmilTholin/svelte-routing
Language JavaScript
Created Date 2017-11-28
Updated Date 2022-12-03
Star Count 1711
Watcher Count 21
Fork Count 151
Issue Count 59


Issue Title Created Date Updated Date