svelte-navigator icon indicating copy to clipboard operation
svelte-navigator copied to clipboard

Nested routes not working as expected when router basepath is set

Open lionzeye opened this issue 2 years ago • 0 comments

Problem: nested routes work as expected when a basepath is set to the Router and navigation is done from a root Route. However, if I trigger a full page reload and try to let the Router pick up a nested Route from the current URL, then no Route content is displayed and the Router doesn't fall back to any other Route in the expected fallback order.

<Router basepath="/host">
    <Link to="svelte">Go to Svelte</Link>
    <Link to="test/1234">Go to test with id 1234</Link>
    <Route path="svelte">Yeah, Svelte!</Route>
    <Route path="test/:id" let:params>at: {params.id}</Route>
    <Route>404</Route>
</Router>

Expected content after full page reload: image

Actual content after page reload: image

Tested version: 3.2.2

lionzeye avatar Feb 15 '23 11:02 lionzeye