Stable Release in branch 2.5
2.5.22
Released 11 Jan 2019
(7 years ago)
SoftwareVue.js
Version2.5
Initial release2.5.0
13 Oct 2017
(9 years ago)
Latest release2.5.22
11 Jan 2019
(7 years ago)
End of support (OSS)04 Feb 2019
(Ended 7 years ago)
Commercial support
(HeroDevs-NES)
Unavailable
Release noteshttps://github.com/vuejs/core/releases/tag/v2.5.22
Source codehttps://github.com/vuejs/core/tree/v2.5.22
Documentationhttps://v2.vuejs.org
Vue.js 2.5 ReleasesView full list

What Is New in Vue.js 2.5

Vue 2.5 introduces significant enhancements focused on developer experience, type system support, and error handling. This release brings better TypeScript integration, more powerful Single-File Components, and a new lifecycle hook for error management.

Category Key Changes
New Features errorCaptured hook, Functional component template syntax, Improved JSX/TypeScript support, Custom directive hooks object syntax.
Improvements Type definitions for TypeScript, Server-side rendering with stream support, Performance optimizations in the virtual DOM.
Bug Fixes Multiple fixes across the compiler, core, and server-side renderer.
Deprecated delimiters component option, Vue.compile with non-DOM environments.

How does the new errorCaptured hook change error handling?

The errorCaptured hook is a game-changer for building resilient component trees. It allows a parent component to catch errors from its child components, similar to a try-catch block but in the component hierarchy.

In practice, you can use it for logging, displaying fallback UI, or preventing the entire app from crashing. The hook receives the error, the component instance, and a source string, giving you full context to decide how to handle it.

export default {
  errorCaptured(err, vm, info) {
    // Handle the error, log it, or send it to a service
    // Return false to stop the error from propagating further
  }
}

What improvements were made for Single-File Components?

Functional components can now be written entirely within a Single-File Component using the functional attribute on the <template> tag. This cleans up the syntax and keeps style and scoped styles working.

<template functional>
  <div>{{ props.message }}</div>
</template>

The compiler also got smarter. It now caches static nodes at the component level, which speeds up repeated renders. For server-side rendering, the template compiler can be configured to use different optimization strategies.

Why is TypeScript support a big deal in this release?

Vue 2.5 ships with officially maintained TypeScript type definitions out of the box. This means you get accurate auto-completion and type checking in editors like VSCode without installing third-party packages.

The types now properly support JSX/TSX usage within Vue components. In practice, this makes Vue a first-class citizen in TypeScript projects, reducing friction for teams adopting static typing.

What's new with Server-Side Rendering?

The server-side renderer gained support for streaming. Using renderToStream can lead to faster time-to-first-byte for your Node.js server, improving perceived performance.

Under the hood, the compiler's SSR optimization mode was improved. It does a better job optimizing the render function for server execution, which can reduce server load for high-traffic apps.

Were there any breaking changes or deprecations?

No major breaking changes, but a couple of deprecations to be aware of. The delimiters component option is now deprecated. Use the global Vue.config.delimiters instead if you need custom interpolation symbols.

Also, using Vue.compile in non-DOM environments (like Node.js with fake DOM) is deprecated. The compiler needs real DOM to properly parse templates.

FAQ

Can I use the errorCaptured hook to replace my global error handler?
Not exactly. errorCaptured works at the component level for errors from its children, while Vue.config.errorHandler is a global catch-all. They work together. Use the hook for localized error recovery and the global handler for logging errors that bubble all the way up.

Does the new functional SFC syntax work with scoped CSS?
Yes, that's one of the main benefits. Before 2.5, you had to define functional components in plain JavaScript to get performance benefits, losing SFC features. Now you can keep <style scoped> in the same file and it just works.

How do I update my project to benefit from the TypeScript improvements?
If you're already using TypeScript, update Vue to 2.5 and remove any third-party type definitions like @types/vue. The official types are now bundled. Ensure your tsconfig.json has "strict": true for the best experience.

What is the performance impact of the virtual DOM optimizations?
The updates make diffing and patching the virtual DOM more efficient in certain edge cases, like component root nodes. For most apps, it's a small, free performance bump. You won't need to change your code.

Is the streaming SSR compatible with all Node.js frameworks?
The renderToStream method returns a Node.js readable stream. It works with any framework that supports streams, like Express or Koa. In practice, you pipe the stream directly into the response object for faster output.

Releases In Branch 2.5

VersionRelease date
2.5.2211 Jan 2019
(7 years ago)
2.5.2111 Dec 2018
(7 years ago)
2.5.2010 Dec 2018
(7 years ago)
2.5.1909 Dec 2018
(7 years ago)
2.5.1807 Dec 2018
(7 years ago)
2.5.18-beta.002 Dec 2018
(7 years ago)
2.5.1701 Aug 2018
(8 years ago)
2.5.17-beta.023 Mar 2018
(8 years ago)
2.5.1613 Mar 2018
(8 years ago)
2.5.1510 Mar 2018
(8 years ago)
2.5.1409 Mar 2018
(8 years ago)
2.5.1219 Dec 2017
(8 years ago)
2.5.1319 Dec 2017
(8 years ago)
2.5.1114 Dec 2017
(8 years ago)
2.5.1012 Dec 2017
(8 years ago)
2.5.927 Nov 2017
(8 years ago)
2.5.821 Nov 2017
(8 years ago)
2.5.720 Nov 2017
(8 years ago)
2.5.618 Nov 2017
(8 years ago)
2.5.517 Nov 2017
(8 years ago)
2.5.416 Nov 2017
(8 years ago)
2.5.303 Nov 2017
(8 years ago)
2.5.013 Oct 2017
(9 years ago)
2.5.113 Oct 2017
(9 years ago)
2.5.213 Oct 2017
(9 years ago)