Vue.js 3.5.40
Vue.js 3.5.40 has landed — a focused bug-fix release that patches several areas of the framework including hydration, reactivity, server-side rendering, and runtime-core. No new features this time, but the stability gains are worth the upgrade.
What's Fixed in Vue.js 3.5.40
This release is all about squashing bugs that cropped up in the 3.5 cycle. The team addressed ten separate issues, many of which were community-reported edge cases in real-world production apps.
- Compiler-core: Fixed a leak of slot branch keys that could cause stale renders in conditional slot scenarios (#15048).
- Hydration: Namespace is now properly passed when patching dynamic props, fixing hydration mismatches in SVG and MathML contexts (#15081).
- Reactivity: Effect removal during a scope stop no longer throws — a subtle timing bug that affected cleanup in composables (#15083).
- Runtime-core: Lazy hydration now correctly skips detached roots, preventing client-side crashes when a component is mounted outside the expected tree (#15091).
- Runtime-core: Dangling blocks are unwound properly when slot content throws, avoiding memory leaks and inconsistent UI state (#15070).
- Runtime-dom: The select element's model type is now respected, fixing a regression where v-model on select could use the wrong comparison (#15009).
- Server-renderer: Errors in optimized component renders are now caught rather than silently swallowed (#12575).
- Server-renderer: A package dependency cycle was removed, cleaning up the module graph and reducing bundle size for SSR builds (#15063).
- Shared: SSR comment escaping no longer creates closing delimiters, fixing a rare HTML injection-like glitch in server-rendered content (#15045).
- Types: The
$elcomponent type is no longer constrained toElement, allowing better typing for components that render fragments or text nodes (#15040).
Should You Upgrade?
If you're running any 3.5.x version, the upgrade is a drop-in replacement — no breaking changes, no deprecation warnings. The bug fixes around hydration and server rendering are particularly impactful if you're building SSR apps with Nuxt or Vite. The effect-scope fix is worth it for anyone using composables with onScopeDispose.
Upgrade via your package manager of choice:
npm install [email protected]
pnpm add [email protected]
yarn add [email protected]
Vue.js 3.5.40 is available now on npm. Check the full changelog for the complete list of changes.