Vue Router v5.3.0
vuejs/router
Summary
Vue Router v5.3.0 introduces several important updates, including a fix for race condition errors in development and improved scroll handling based on history.scrollRestoration. Notably, performance enhancements have been made by replacing dependencies and optimizing route resolution, alongside various bug fixes and type improvements for better developer experience.
Full release notes
🚀 Features
- Prevent race condition dev-only error - by @meihao550 in https://github.com/vuejs/router/issues/2789 (d2b87)
- scroll: Skip scroll computation based on history.scrollRestoration - by @posva (033f1)
- unplugin: Don't crash on duplicate definePage() calls - by @posva in https://github.com/vuejs/router/issues/2753 (686bf)
- volar: Narrow
typeof useRoutein a type context - by @Anoesj in https://github.com/vuejs/router/issues/2759 (7a4c8)
🐞 Bug Fixes
- history:
- Remove visibilitychange listener to prevent focus steal in Edge - by @Mini-Sylar in https://github.com/vuejs/router/issues/2704 (17b58)
- router:
- Skip scroll saving for unknown pop direction - by @ifer47 in https://github.com/vuejs/router/issues/1431 and https://github.com/vuejs/router/issues/2780 (23150)
- types:
- Allow unsetting a route name with
falseinEditableTreeNode- by @Anoesj in https://github.com/vuejs/router/issues/2752 (8e2e1)
- Allow unsetting a route name with
- unplugin:
- Sort and dedupe params in generated types - by @posva (a25fa)
- Skip unnamed params in generated route types - by @posva (c694e)
- Report unnamed params once per route - by @posva (52058)
- Generate param types from override paths and stop inheritance on absolute overrides - by @G100my in https://github.com/vuejs/router/issues/2646 (67bab)
🏎 Performance
- Replace
json5andyamlwithconfbox- by @danielroe in https://github.com/vuejs/router/issues/2769 (aab28) - Avoid depending on the current route to resolve absolute locations - by @danielroe (9b7e3)
- experimental: Avoid tracking currentRoute in absolute string locations - by @posva (084fc)
