-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
routeRules static with NuxtLink not working correctly #15580
Comments
The same is happening to me. Not sure if that is intended or not. But feels weird to get new data on nuxt link navigation and then on refresh get cached one. Could confuse the user in case he navigates on the site and then refreshes a page... |
I got the same behaviour with a full static website. On navigation there are backend calls but on page refresh it correctly load the payload. Also the payload get preloaded but are not really used when clicking on NuxtLinks. I created an issue on nuxt-graphql-client but maybe this is more of a nuxt issue: Diizzayy/nuxt-graphql-client#276 edit: probably related to nuxt/framework#8885 |
You need to have |
My issue was related to inconsistent slug handling in my catchall page, and probably different and/or wrong response from the graphql backend. After making sure the "full slug" has leading and trailing slashes the static site generation is working as expected. |
Environment
Windows_NT
v16.17.0
3.0.0
1.0.0
pnpm@7.14.2
vite
routeRules
-
-
Reproduction
https://github.com/AscaL/nuxt-rendering/tree/28e735a75b3cb0e564e513cd237d42767d0ac779 (not working)
https://github.com/AscaL/nuxt-rendering/tree/84d2ddce6560e899f709308a6460954a3a502d7a (working)
Describe the bug
I have the root page set up with 3
NuxtLink
that point to/static
,/swr
and/ssr
with the following rules:on each page i
await useFetch('https://worldtimeapi.org/api/ip')
to get a time.after uploading to netlify, the
/static
page shows the correct (cached version) on refresh, but entering it via aNuxtLink
from the root/
, runs the fetch getting me my current time. If i then refresh the page i get the correct cached version.By replacing the
NuxtLink
with an<a>
it works as intended.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: