Vue 2 → Vue 3
hardVue 2 is EOL (Dec 2023). Vue 3 brings Composition API, Teleport, Suspense, and better TypeScript support. Major breaking changes in reactivity system and template compilation.
Vue 3 has a migration build that runs Vue 2 code with warnings for incompatible patterns.
npm install vue@3 @vue/compat
Vue.component() → app.component(). Vue.use() → app.use(). New Vue() → createApp().
Optional but recommended. Options API still works. Use <script setup> for concise components. ref() and reactive() replace data().
Vuex 3/4 → Pinia (officially recommended). defineStore replaces modules. Better TypeScript support.
npm install pinia && npm uninstall vuex
v-model breaking changes, key on v-if branches, v-bind merge order changed. Run vue-codemod for automated fixes.
What this migration involves
Moving from Vue 2 to Vue 3 is rated hard and takes about 16-40h on a typical project. The guide breaks it into 5 steps, 2 of which ship with runnable commands and 1 with a verification check.
Related migrations
FAQ
How long does migrating from Vue 2 to Vue 3 take?
Around 16-40h for a typical project — 5 steps, difficulty rated hard, 2 of them with copy-paste commands.
Is moving from Vue 2 to Vue 3 reversible?
No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Vue 2 data before you start.
What does Vue 3 cost compared to Vue 2?
Pricing for both tools is contact-based or not tracked yet.