Skip to content
Home / Migrations / Vue 2Vue 3

Vue 2 Vue 3

hard

Vue 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.

Estimated: 16-40h · 5 steps
Progress0%
Step 1: Run migration build

Vue 3 has a migration build that runs Vue 2 code with warnings for incompatible patterns.

npm install vue@3 @vue/compat
Step 2: Fix global API changes

Vue.component() → app.component(). Vue.use() → app.use(). New Vue() → createApp().

Step 3: Migrate to Composition API

Optional but recommended. Options API still works. Use <script setup> for concise components. ref() and reactive() replace data().

Step 4: Update Vuex to Pinia

Vuex 3/4 → Pinia (officially recommended). defineStore replaces modules. Better TypeScript support.

npm install pinia && npm uninstall vuex
Step 5: Fix template changes

v-model breaking changes, key on v-if branches, v-bind merge order changed. Run vue-codemod for automated fixes.

All components render, reactivity works, router navigates correctly.

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.

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.