OpenVue
  • Give a Star

Migration from PrimeVue v4

Move an existing PrimeVue v4 project to OpenVue with one command.

OpenVue is a fork of PrimeVue v4 that keeps the public API unchanged: usePrimeVue, PrimeVueResolver, the primevue Nuxt config key, p- prefixed CSS classes and pass-through options all work exactly as before. Migrating is therefore a package rename, which is exactly and only what @openvue/migrate does: an automated codemod that rewrites your project's imports and package references from PrimeVue to OpenVue.

The tool is ready to use. It handles Vite, Nuxt and Laravel projects, monorepos included, and always shows you what it will change before touching a single file.

Migration is a single command, run from the root of your project. For monorepos, run it at the workspace root.

Run in a terminal, it shows a plan with the detected package manager, PrimeVue version, the files and references it will change, and your git status, then asks how to proceed:

  • Full migration: rewrite files and run your package manager's install (detected from the lockfile) so the project builds immediately.
  • Files only: rewrite files and dependencies but leave node_modules alone; you run the install yourself.
  • Dry run: show everything, write nothing.

Pass a mode flag (--mode, --dry, --no-install) or --yes to skip the prompt; any non-terminal run such as CI or piped output is non-interactive as well.

Already installed OpenVue yourself? If openvue is found in your package.json or node_modules, the tool switches to sources-only mode: dependencies and node_modules are left completely untouched, no install runs, and only source-file imports are rewritten.


npx @openvue/migrate

  1. Renames dependencies in every package.json, monorepos included: dependencies, devDependencies, peerDependencies, optionalDependencies, resolutions, overrides and pnpm.overrides, including selector keys like **/primevue or primevue@^4. workspace:, catalog: and npm: protocol values are preserved, and pnpm-workspace.yaml catalogs are rewritten too.
  2. Rewrites module specifiers in .js, .ts, .vue, .jsx, .tsx, .astro, .mdx and related files: static imports, import type, require(), dynamic import(), Nuxt modules arrays, Vite optimizeDeps and transpile entries, and generated components.d.ts files. A bare primevue string is only rewritten in import positions, so runtime data like provider: 'primevue' is never touched.
  3. Audits what's left: after rewriting, it scans sources, styles, HTML and tsconfig files for surviving PrimeVue references and lists each one with file and line, so it never reports success while actionable references remain.

The rename mapping:

FromTo
primevue, primevue/*openvue, openvue/*
@primevue/core, @primevue/forms, @primevue/icons, @primevue/themes, @primevue/nuxt-module, @primevue/auto-import-resolver, @primevue/metadata, @primevue/mcpsame names under @openvue/*
OptionDescription
[dir]Directory to migrate (defaults to the current directory)
--mode <mode>full, files-only or dry; runs without prompting
--dryReport what would change without writing any files
--no-installRewrite files but do not run the package manager install
--forceDo not stop on an uncommitted git working tree
--yes, -ySkip prompts and use defaults (full migration)

In interactive mode a dirty git tree only asks for confirmation. Non-interactively (with a mode flag, --yes or in CI) it stops unless you pass --force, so the migration stays a single reviewable, revertible diff.

If you just want to evaluate OpenVue first, add an override yourself instead of running the codemod; no source changes needed. Use overrides for npm and bun, or resolutions for yarn.

On pnpm, put the same overrides entry in pnpm-workspace.yaml instead, because pnpm 11 no longer reads the pnpm field from package.json.

Once you decide to stay, run npx @openvue/migrate for the real rename.


{
    "overrides": {
        "primevue": "npm:openvue@1.0.0-rc.0"
    }
}

  • Node.js 18 or newer.
  • Your project must be on PrimeVue 4.x, the fork point. The tool detects the installed major from package.json, a catalog: or workspace: protocol, node_modules or the lockfile, and stops without changing anything if it finds a non-4.x version. Coming from v3 or earlier, apply the PrimeVue v4 migration guide first, then run the tool.

Is OpenVue a drop-in replacement for PrimeVue?

Yes. OpenVue is a fork of PrimeVue 4.5.5 that keeps the public API unchanged: usePrimeVue, PrimeVueResolver, the primevue Nuxt config key, p- prefixed CSS classes and pass-through options all work exactly as before. Migrating is a package rename, not a rewrite.

How do I migrate a PrimeVue project to OpenVue?

Run @openvue/migrate from the root of your project. It detects your package manager and PrimeVue version, shows you a plan of every file and reference it will change, and only then rewrites imports and dependencies. Monorepos, Vite, Nuxt and Laravel projects are supported, and a dry run mode writes nothing.

What licence is OpenVue released under?

OpenVue is MIT licensed. PrimeVue 4.5.5 was the last release published under an open source licence, and OpenVue continues that work in the open with bug fixes, accessibility and performance improvements, and support for current Vue and Nuxt releases.

Can I migrate from PrimeVue v3?

Not directly. The fork point is PrimeVue 4.x, and the tool stops without changing anything if it finds a different major. Apply the PrimeVue v4 migration guide first, then run @openvue/migrate.