When using the immutable compiler option in Svelte, the router seems to be non-functioning. Clicking a link doesn't navigate to the new URL and the view remains unchanged.
To Reproduce
Steps to reproduce the behaviour:
Create a new Framework7 Project with Svelte (I've been using the tabs template in my tests)
In vite.config.js, update the svelte plugin to set immutable to true
Observe that the tabs themselves operate correctly ✅
Click on 'About' or 'Form' under Navigation
View/route remains unchanged
Expected behaviour
Navigation should work as expected taking the user to the new view.
Potential solution
In my troubleshooting, one solution could be to explicitly set immutable to false inside framework7-svelte/components/view.svelte.
<svelte:options immutable={false} />
This resolves the issue, and wouldn't present a breaking change as immutable is currently presumed to be false, as this is a Svelte default. I'm new to Framework7 though, so I am not sure if a <Link> can be used outside of the context of a <View>, which case perhaps we need to set this in a few different components.
Describe the bug
When using the
immutable
compiler option in Svelte, the router seems to be non-functioning. Clicking a link doesn't navigate to the new URL and the view remains unchanged.To Reproduce
Steps to reproduce the behaviour:
tabs
template in my tests)vite.config.js
, update thesvelte
plugin to setimmutable
totrue
Expected behaviour
Navigation should work as expected taking the user to the new view.
Potential solution
In my troubleshooting, one solution could be to explicitly set
immutable
tofalse
insideframework7-svelte/components/view.svelte
.This resolves the issue, and wouldn't present a breaking change as
immutable
is currently presumed to befalse
, as this is a Svelte default. I'm new to Framework7 though, so I am not sure if a<Link>
can be used outside of the context of a<View>
, which case perhaps we need to set this in a few different components.