Releases: vuejs/vue-router
v3.0.1
v2.8.1
v3.0.0
Breaking Changes
This major release only breaks backwards compatibility if you use TypeScript.
- 
TypeScript type declarations have been updated to be compatible with Vue core 2.5+ and no longer work with 2.4 and below. 
- 
All type declarations are now exported using ES-style exports, and must be imported using ES modules syntax: import VueRouter from 'vue-router' 
v2.8.0
New Features
- 
Hash mode now also supports scrollBehaviorwhen the browser supportshistory.pushState. (@ariesjia via #1662)
- 
scrollBehaviornow supports returning a Promise. The scrolling will be executed when the Promise is resolved. (@homerjam via #1758)
Fixed
- #1508 avoid first popstate event with async guard together (@Jinjiang)
- #1557 do not remove trailing slash in strict mode (@posva)
- #1568 handle null values when comparing query objects (@posva)
- #1586 fix scroll when going back to initial route (@hworld)
- #1690 fix query comparison with deep values shared by reference (effb114)
- #1695 send props not defined on the route component in $attrs (@lbogdan)
- Properly resolve async components imported from native ES modules (8a28426)
v2.7.0
v2.6.0
New Features
- 
Now supports nesting abstract routers inside the main router app. Example 
- 
New route config options: - 
caseSensitive: makes the route match with case sensitivity.
- 
pathToRegexpOptions: path-to-regexp options to use when compiling the match regex for this route.
 
- 
- 
When returning a selector in scrollBehavior, an additional offset object can also be specified:scrollBehavior (to, from, saved) { return { selector: '#foo', offset: { x: 0, y: 10 } } } (@sigerello via #1501) 
- 
New route instance option: fallback.Controls whether the router should fallback to hashmode when the browser does not supporthistory.pushState. Defaults totrue.Setting this to falseessentially makes everyrouter-linknavigation a full page refresh in IE9. This is useful when the app is server-rendered and needs to work in IE9, because a hash mode URL does not work with SSR.
Bug Fixes
- Added TypeScript definition for linkExactActiveClass(@aicest via #1471)
- Fix scrollBehaviorreceiving incorrectfromparameter (@mutoo via #1479)
- Prevent throwing Error when linking to non-existent named route (@posva via #1387)
- Silence named route default child warning when redirecting (@decademoon via #1442)
- Fix nested object comparison for queries (@posva via #1425)
- Fix hash-mode replaceHash()when page has<base>(@daohoangson via #1396)
- Fix <base>that includes HTTP(S) origin
- Fix route alias for /and paths nested under/
v2.5.3
v2.5.2
v2.5.1
v2.5.0
New
- 
New method: router.beforeResolve(). Registers a global route guard similar torouter.beforeEach(), except that it is called right before a navigation is confirmed, after all other guards and async components have been resolved.
- 
router.beforeEach,router.beforeResolveandrouter.afterEachnow return a function that removes the registered guard/hook when called.
- 
A router-linknow also automatically gets arouter-link-exact-activeclass when the current route is an exact match with its destination. The class can also be configured via theexact-active-classprop or the globallinkExactActiveClassrouter option. (@caikan via #1361)
Fixed
- Ensure consistent path matching priority in all JavaScript environments
- #1176 ensure wildcard routes are always matched last
- #1320 avoid triggering beforeRouteUpdate and beforeRouteLeave for instances that are not created yet
- #1322, #1338 fix hooks losing instance reference when same component is used for mutiple routes
- #1323 fix active class priority (@posva via #1324)
- #1329 avoid resolving async components before guards have been resolved