Skip to content

emitRouteChunkError: 'reload' redirects incorrectly with hashMode: true #19182

Description

@sky-code

Environment


  • Operating System: Darwin
  • Node Version: v19.5.0
  • Nuxt Version: 3.2.2
  • Nitro Version: 2.2.2
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: ssr, router, experimental, components, modules, css, runtimeConfig, vite, imports, vue
  • Runtime Modules: @pinia/nuxt@0.4.6, bootstrap-vue-next/nuxt
  • Build Modules: -

Reproduction

In description.

Describe the bug

set router: { options: { hashMode: true }, }, make a build with nuxt generate, deploy .output/public to any static hosting, open some page, make changes to another page, rebuild and re-deploy, and then try to navigate to another page with changes from already opened page from previous build, you'll have redirect without # which in my case lead to 404 error.
Path saved in local storage nuxt:reload does not contains # and NUXT_APP_BASE_URL prefix.
Instead of redirect to https://example.com/app/#/directory/page I got redirected to https://example.com/directory/page

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

Labels

3.x🐛 bugSomething isn't working as expected🔨 p3-minorMinor issue, should be fixed

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions