A 404 in SSG mode causes the entire webpage to reload. #71786
Labels
bug
Issue was opened via the bug report template.
please simplify reproduction
The reproduction is too complex
Link to the code that reproduces this issue
https://github.com/jheng-jie/about-me-mix/tree/main
To Reproduce
Let's just discuss it for now, and I'll add more later.
Current vs. Expected behavior
Whether using page router or app router, as long as SSG export is selected, encountering a 404 page will break out of CSR mode, causing the website to refresh.
I noticed that before the redirection, a request for page.json is made. If this request results in a 404, it will cause a refresh, but I need a 404 during the CSR phase of the redirection.
Is there a way to handle the processing after a 404 request myself? I think this is the fastest method.
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: