Skip to content

Migrations

A list of breaking changes that may require code changes.

v1 -> v2

  • beforeEnter redirect no longer accepts replace. It is inherited from the original navigation: router.redirect({ ..., replace: true }) completes the whole redirect chain with replaceState, while a regular router.redirect(...) uses pushState

  • In browser Back / Forward popstate navigations, beforeEnter redirect always uses replaceState to avoid infinite loops and broken Back navigation

  • preventRedirect was removed from beforeLeave because it created a false expectation that browser Back / Forward popstate navigations can be blocked. If you need to handle a forbidden navigation, use beforeEnter redirect

No AI participated in the development. MIT License