This issue has troubled me for a very long time.
No matter how I deploy it on Netlify, refreshing dynamic routes will always return to the homepage, unless I enable hash mode.
I am using this project:
It has an example, and the example is also deployed on Netlify, where the same issue exists:
Itβs the service worker causing issues. Itβs intercepting the request and serving incorrect data. If I select the bypass for network flag:
which will skip using the serving worker, the page works fine. This is not a Netlify issue.
Thank you!
After realizing this issue, I disabled PWA and successfully resolved the problem.
For friends facing the same issue, you only need to disable PWA in nuxt.config.ts.
