Reputation: 5328
I have a svelte app with svelte-navigator running on localhost, the routing works fine, except when I refresh a page, then I get a 404 Error, page not found.
<script>
import { Router, Route } from "svelte-navigator";
</script>
<Router>
<Route path="/">
<Login />
</Route>
<Route path="/myhome">
<MyHome />
</Route>
</Router>
Upvotes: 0
Views: 219
Reputation: 184524
That package appears to do client-side SPA routing, so your server, whatever that is, has to return the same page for whatever path is requested or you need to configure a 404 fallback page if it allows for that.
Upvotes: 1