Compare Vue.js versions and see exactly what changes, what requires action, and what you can start using.
→
36Changes
6Breaking
6Actions
14Features
1Migration tools
Breaking Changes
defineComponent() function overload type changed
Action required
breakinglow impact
Vue 3.3 repurposes the rarely used defineComponent() function overload to support improved generic component typing, changing its TypeScript type behavior.
Migration
Review code that passes a function directly to defineComponent(). This overload was rarely used, but its type signature changed in Vue 3.3.
TSX users should set jsxImportSource to vue in tsconfig.json or add an @jsxImportSource vue pragma per file. Projects that depend on the old global JSX namespace can explicitly reference vue/jsx.
Vue 3.1 adds onServerPrefetch(), allowing Composition API components to register asynchronous work that should be resolved during server-side rendering.
No migration is required. Existing setup() components remain valid. <script setup> can be adopted incrementally to reduce Composition API boilerplate in Single-File Components.
No migration is required. effectScope() is primarily useful for reusable composables and libraries that need explicit control over groups of reactive effects.
No migration is required. Components that previously needed a second normal <script> block solely for supported component options can use defineOptions().
Vue 3.3 introduces experimental support for destructuring defineProps() while preserving reactivity and allowing native default-value syntax.
Migration
No migration is required. This feature was experimental in Vue 3.3 and should be treated according to the behavior and stability of the target Vue version.
Vue 3.3 introduces the experimental defineModel() compiler macro for declaring a component v-model prop and its corresponding update event with less boilerplate.
toRef() normalization improved and toValue() introduced
featuremedium impact
Vue 3.3 enhances toRef() so it can normalize values, getters and existing refs, and introduces toValue() for normalizing values, refs and getters into values.
No migration is required. Composables can use toValue() when accepting values, refs or getters, and the normalization form of toRef() when a ref representation is needed.
Vue 3.4 promotes defineModel() from experimental to stable, providing a concise way to declare a component v-model prop and its corresponding update event.
<script setup lang="ts">
const model = defineModel<string>()
</script>
Migration
No migration is required. Projects that avoided defineModel() while it was experimental can now adopt the stable API. Vue 3.4 also removes the previous local option and supports local mutation by default.
SFC macros support imported and complex TypeScript types
typescripthigh impact
Vue 3.3 expands type support in macros such as defineProps() and defineEmits(), allowing imported types and a broader set of complex TypeScript types to be used directly.
<script setup lang="ts">
import type { UserProps } from "./types"
defineProps<UserProps>()
</script>
Migration
No migration is required. Existing local type declarations remain valid. Imported and supported complex types can now be used directly with SFC compiler macros.
Vue 3.3 adds support for TypeScript's jsxImportSource option, allowing Vue JSX typing to be opted into explicitly and reducing conflicts with other JSX ecosystems.
Vue 3.3 still provides the global JSX namespace for backwards compatibility, but TSX users should configure jsxImportSource for forward compatibility because the default global registration was planned for removal in Vue 3.4.
defineComponent() gained generic component support
typescriptmedium impact
Vue 3.3 improves TypeScript support for authoring generic components with defineComponent(), complementing generic support in <script setup>.
Migration
No migration is required. Library and component authors can use the improved generic typing when component APIs need to preserve relationships between types.
Template parser rewritten for substantially better performance
performancemedium impact
Vue 3.4 introduces a rewritten template parser that is approximately twice as fast, improving Single-File Component and template compilation performance.
Migration
No migration is required. Applications and build tooling receive the parser performance improvements after upgrading.
Vue 3.4 refactors the reactivity system so computed values and effects trigger more accurately and avoid unnecessary executions in a number of common cases.
Migration
No migration is required. Existing applications benefit automatically from the more efficient reactivity implementation.
Vue 3.2 improves server-side rendering support, including an ESM-bundler build of @vue/server-renderer for better integration with modern build tools.
Migration
No migration is required for most applications. SSR tooling and frameworks can use the improved server-renderer packaging with modern ESM-based build pipelines.
Vue 3.1 introduced the @vue/compat migration build, which provides Vue 2 compatible behavior with runtime warnings for APIs and behaviors that need to be migrated.
Migration
Projects migrating from Vue 2 can temporarily alias vue to @vue/compat and use compatibility warnings to migrate incrementally. The compatibility build is intended as a migration aid and should be removed after migration is complete.