In my Nuxt 3 application, I'm experiencing an issue with query parameters being lost during Hot Module Replacement (HMR).
When I modify any file in the pages
directory, on updating any of the page I notice:
hmr update /pages/upload/index.vue, /pages/upload/index.vue?macro=true, /@id/virtual:nuxt:C:/Projects/nexus_sync/nexus-sync-v2/nexus-sync-ui/.nuxt/routes.mjs
However, when I modify a component file:
hmr update /components/Text.vue
What's the recommended way to preserve query parameters during HMR when modifying page files in Nuxt 3?
Why the params being lost on any update in any of the pages files.
Is this because of vite or something else. I have firstly the url is something like this http://localhost:3002/test?a=1
And when something is changed in page files, Url becomes http://localhost:3002/test
query params are lost
Got Fixed, As there were some external dependencies in my project which were of no use. I removed them and updated the existing ones to latest version. Now query params are working as expected