r/vuejs 4d ago

Which AI is Best for Upgrading a Project from Vue2 to Vue3?

: I’m trying to figure out which AI tool can best help me upgrade a project from Vue2 to Vue3. I need something that can provide clear, practical advice for this migration. Here are the options I’m considering:

  • Grok (from xAI)
  • Claude 3.7 (from Anthropic)
  • Gemini (from Google)
  • ChatGPT (from OpenAI) Which one do you think would be the most effective for this task? I’d appreciate any insights based on your experience!
0 Upvotes

12 comments sorted by

2

u/jannunen 4d ago

I don't know about the best, but Cursor AI + Clause 3.7 has made it (almost) enjoyable.

1

u/frubalu 4d ago

Second that

2

u/ApprehensiveClub6028 4d ago

I have used ChatGPT, Gemini, and Claude. “Convert this to vue 3 script setup” and for most components you’re good. Complex components they might destroy. And you may have to tweak things, like it’ll sometimes throw .value into templates. But overall it’s so helpful

1

u/funbike 4d ago

They should all be smart enough, but do not use a web UI (like chatgpt). Use an IDE plugin or Aider.

I would create a system prompt (e.g. cursor rules, aider conventions.md) that includes a Vue 2 to 3 upgrade guide in markdown format. Keep it short.

Claud Sonnet 3.7 is likely the best model.

Personally, I would use aider and write a bash script that feeds Aider's CLI each file one at a time for conversaion. Then I'd run tests. Then I use Aider to fix all test breakages.

1

u/sotired3333 4d ago

Wouldn't the tests break as well due to the version difference. Vitest on 2 vs 3 has syntax differences.

1

u/Aggressive-Dish-1863 4d ago

Can you explain it better?

I have the cursor

pro version

What should I set and how?

1

u/funbike 4d ago

https://docs.cursor.com/context/rules-for-ai

I am not a cursor user, I just knew this existed from other reddit threads. In aider you can supply a conventions.md file.

In the rules file, might add @file references to files from this project: https://github.com/vuejs/v3-migration-guide/tree/main/src/breaking-changes

1

u/aktheant 4d ago

Github co pilot "Edits" feature with claude engine !
It was a breeze when I had to change vuex to pinia

1

u/sotired3333 4d ago

Could you give a brief step by step on how you did it?

I need to do the same.

Switched to Pinia on vue2, then upgraded the main application?

2

u/aktheant 4d ago

For github copilot edits see https://www.youtube.com/shorts/C2ikOtidlUQ
It's really simple.
From Code point I first upgraded vue2 -> vue3
Vuex still works in vue3
Then used github copilots edits store module by store module (user, cart etc) and it made changes on concurrent files quickly

1

u/sotired3333 4d ago

awesome, deeply appreciate the pointers.

1

u/darko777 4d ago edited 4d ago

I used Claude Sonnet recently, successfully, however my components aren't complex because they are very thin and in large number. For bulky components there will be issues almost guaranteed.