Migrate from PrimeVue
OpenVue keeps PrimeVue 4's public API unchanged, so migrating is a package rename. One command does it and leaves a single diff to review.
npx @openvue/migrate That is the whole migration for most projects. The rest of this page is what the command does, so you know what you are reviewing, and the few cases it leaves to you.
Before you start
- PrimeVue 4.x. OpenVue forked from 4.5.5. The tool detects the installed major version and stops without changing anything if it is not 4.x.
- Node.js 18 or newer.
- A clean git working tree. Then the migration is one commit you can read
and revert. Interactively the tool only asks if the tree is dirty; in CI or with a mode
flag it stops unless you pass
--force.
Run the migration
From the project root (for a monorepo, the workspace root), run the command above. It prints a plan first: the detected package manager, the PrimeVue version, the files and references it will change, and your git status. Then it asks how to proceed:
- Full migration rewrites files and runs your package manager's install, so the project builds straight away.
- Files only rewrites files and dependencies and leaves
node_modulesalone for you to install. - Dry run shows everything and writes nothing.
To run it without the prompt, in CI for example, pass the mode:
npx @openvue/migrate --dry
npx @openvue/migrate --mode files-only
npx @openvue/migrate --yes
If OpenVue is already installed, the tool switches to sources-only mode: it rewrites
imports and leaves dependencies and node_modules untouched.
What it changes
- Dependencies in every
package.json, includingoverrides,resolutions,pnpm.overridesandpnpm-workspace.yamlcatalogs.workspace:,catalog:andnpm:values are preserved. - Imports in
.js,.ts,.vue,.jsx,.tsx,.astroand.mdxfiles: static and dynamic imports,require(), Nuxtmodules, ViteoptimizeDepsand generatedcomponents.d.ts. A bare'primevue'string is only rewritten where it is an import, so runtime data such asprovider: 'primevue'is left alone. - An audit of what is left. Interpolated imports, CSS
@imports, CDN URLs and tsconfigpathsit could not rewrite safely are listed with file and line, so it never reports success while a reference remains.
openvue and @openvue/* are pinned to the exact version the tool
ships with, so a migration is reproducible. @openuxkit/* gets a caret range,
because it versions independently. Widen either afterwards if you prefer.
Package map
| PrimeVue | OpenVue |
|---|---|
primevue, primevue/* | openvue, openvue/* |
@primevue/core, forms, icons, themes, nuxt-module, auto-import-resolver, metadata, mcp | Same names under @openvue/* |
@primeuix/themes, @primeuix/themes/* | @openvue/themes, @openvue/themes/* |
@primeuix/styled, utils, styles, forms, mcp | Same names under @openuxkit/* |
What stays the same
Component props, slots and events match PrimeVue 4.x. So do the names your code already
uses: usePrimeVue, PrimeVueResolver, the p- CSS
classes, pass-through options, and the primevue key in
nuxt.config, which the OpenVue Nuxt module kept on purpose.
Three packages are deliberately left untouched: primeicons,
primeflex and tailwindcss-primeui. The icons have a maintained
replacement, covered next.
Icons
OpenIcons continues PrimeIcons. Swap the package and the
stylesheet, and every existing pi pi-* class keeps rendering through a
compatibility layer:
npm uninstall primeicons
npm install @openvue/openicons - import 'primeicons/primeicons.css';+ import '@openvue/openicons/primeicons.css';
Move to the new oi oi-* classes at your own pace by importing
@openvue/openicons/openicons.css; both stylesheets can be loaded at once. The
one icon removed rather than renamed is pi-prime, the PrimeTek logo mark.
Coming from Volt
If the project uses PrimeVue Volt components, run the migration first, then replace them with OpenVolt:
npx @openvue/migrate
npx openvolt-vue add all --overwrite
Leave out --overwrite to keep the components you have customised; only the
untouched ones are replaced.
Try it without changing code
To evaluate OpenVue before committing to the rename, alias it in place of PrimeVue. No source file changes:
// package.json (npm and bun; yarn uses "resolutions")
{
"overrides": {
"primevue": "npm:openvue@1.0.0"
}
}
On pnpm 10.5 and newer the override belongs in pnpm-workspace.yaml under
overrides. Once you decide to stay, run npx @openvue/migrate for
the real rename.
PrimeVue 3 and earlier
Upgrade to PrimeVue 4 first with the v4 migration guide, then run npx @openvue/migrate. The tool will not run on a project that is
not on 4.x.
Stuck on something the tool did not handle? Open an issue or ask in Discord. Migration gaps are bugs, and we fix them.