Skip to content

Error: No match for {"name":"JobPage","params":{"id":"1"}} #434

Closed Answered by posva
Wolverin-e asked this question in Questions and Help
Discussion options

You must be logged in to vote

Oh I think I forgot to update the docs and this might be related to HMR. It's now better to add this:

import { createRouter, createWebHistory } from 'vue-router'
import { routes, handleHotUpdate } from 'vue-router/auto-routes'

export const router = createRouter({
  history: createWebHistory(),
  routes,
})

if (import.meta.hot) {
  handleHotUpdate(router)
}

And it should work without restarting or reloading the page

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@posva
Comment options

Answer selected by Wolverin-e
@posva
Comment options

@Wolverin-e
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants