A CLI tool that automatically migrates Vue 2 Options API JavaScript files to Vue 3 Composition API style. Current stable version is 0.4.5 (beta). Release cadence is irregular; maintained by a single developer. Key differentiator: it splits Vue 2 component options (data, methods, computed) into separate Composition API files, factoring out logical concerns into individual composition functions. Currently supports only .js files, planned support for .ts and .vue SFC. Requires Vue 2.x as a peer dependency for initial project, but the output is Vue 3 compatible.
npm install vue2-to-3No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates global install of the CLI tool, creation of a Vue 2 Options API component, running the migration, and viewing the transformed Vue 3 Composition API output.
Convert .ts to .js before migration, or wait for future updates.
Always version-control your files or create a backup before running the migration.
Check the target directory for naming conflicts before running migration.
Review the migrated code manually and fix any issues.
Run `npm i -g vue2-to-3` or use `npx vue2-to-3 migrate ./file.js`
Run `npm install vue` in your project root.
Ensure the file exports an object with `data`, `methods`, `computed`, etc.