The Wire · Showcase
ROUTER ELIMINATES UNNECESSARY RESOLVES ON EVERY NAVIGATION
By RepoJournal · Filed · About Vue.js
Vue Router just killed a performance leak where every mounted RouterLink was re-resolving its destination on every page navigation, even when it had nothing to do with the current route.
The culprit: the `resolve` function was tracking `currentRoute` as a dependency even when it didn't need it [1]. That meant every navigation triggered a cascade of regex matching and param decoding across your entire link tree. Daniel Roe caught this while profiling Nuxt and shipped the fix [3], which stops `resolve` from depending on the current route when resolving absolute locations. Meanwhile, the router team also tightened type generation for route overrides [2], fixing a bug where params from override paths weren't reflected in generated types and absolute paths could still inherit ancestor params incorrectly [4]. On the VitePress side, the theme is getting stability fixes: layout shifts are now prevented when locking page scroll [5], and the outline now handles bottom overscroll properly [6]. The ecosystem-ci test suite has adapted to upstream dependency changes [7], keeping integration tests in sync as the wider Vue ecosystem evolves. Across all three repos, 13 commits and 9 PRs landed in the last 24 hours.
One email a day. Unsubscribe in one click.
Keep up with Vue.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Update Vue Router to get the RouterLink performance fix before shipping high-traffic apps with many links vuejs/router [plan]
- → Review route type overrides in your app if you use definePage() or <route> blocks with absolute paths vuejs/router [monitor]
- → Run ecosystem-ci locally if you maintain a Vue library to catch upstream dependency issues early vuejs/ecosystem-ci [monitor]
References
- [1] perf: avoid depending on the current route to resolve absolute locations ↗ vuejs/router
- [2] fix(unplugin): generate param types from override paths and stop inheritance on absolute overrides ↗ vuejs/router
- [3] perf: avoid depending on the current route to resolve absolute locations vuejs/router
- [4] fix(unplugin): generate param types from override paths and stop inheritance on absolute overrides (#2646) vuejs/router
- [5] fix(theme): prevent layout shifts when locking page scroll vuejs/vitepress
- [6] fix(theme): handle outline bottom overscroll (#5375) vuejs/vitepress
- [7] fix: adapt ecosystem tests to upstream dependency changes (#98) vuejs/ecosystem-ci