-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Middleware causing full page reload when Link has prefetch={false} #460
Comments
In your reproduction I don't get a full reload when I click on the "bar" link and I also don't see any functionality from Am I missing something? |
Thank you for your report. Unfortunately, the reproduction is missing or incomplete, and as such we cannot investigate this issue. Please add a reproduction to the issue, otherwise it will be closed automatically. Templates: Creating a good bug report takes time. To help us resolve the issue quickly, please simplify the reproduction as much as possible by removing any unnecessary code, files, and dependencies that are not directly related to the problem. The easier it is for us to see the issue, the faster we can help you. Apart from the reproduction, make sure to include the precise steps on how to reproduce the issue, e.g.:
Thank you for your understanding! FAQ"I've included a reproduction, what is missing?" This comment might have been added because your reproduction doesn't point to either a CodeSandbox or a public GitHub repository where the issue can be reproduced. Please make sure:
|
This issue has been automatically closed because it is missing a reproduction and there hasn't been any activity for 7 days. If the problem persists, please create a new bug report. |
hi @amannn
There is and it's in the middleware: https://codesandbox.io/p/sandbox/adoring-tu-8k2j6f?file=/middleware.ts:1,1
The bar link works fine because the |
@amannn And if I remove the middleware everything works normally, that's why I thought the culprit might be the middleware |
My apology that I noticed that my initial description mentioned clicking on the 'bar' which has the correct behavior. I updated the description. |
Ah right, now I see. Here's a fix for your issue: vercel/next.js#43118 (comment) |
@amannn OH NICE! It works like a charm! Thank you very much! |
Description
When the has prefetch={false}, navigation would cause a full page reload, this happens when middleware is being used.
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://codesandbox.io/p/sandbox/adoring-tu-8k2j6f?file=/app/[locale]/page.tsx:5,1-6,1
Reproduction description
Steps to reproduce:
Expected behaviour
Should behave like a SPA intead of full page reload
The text was updated successfully, but these errors were encountered: