You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In current Vite+, when running vp add vue with pnpm catalogs configured in pnpm-workspace.yaml, it totally ignores the catalog and add the package with it version directly in package.json.
Since pnpm catalogs feature provide a lot of benefit for packages management (Anthony Fu wrote a blog about it), it will be great if VIte+ does support it.
Suggested solution
This feature can be toggle by a config in vite.config.ts: pnpm.catalog: boolean or an env var like VP_CATALOG=boolean.
When running vp add and Vite+ detects a workspace that use pnpm catalog: instead of adding packages with pinned versions, it writes catalog: references into package.json and updates the workspace catalog:
# Given pnpm-workspace.yaml with:# catalogs:# prod:# react: ^18.3.0
vp add react
# → detects react in "prod" catalog# → writes "react": "catalog:prod" to package.json# → runs vp install
vp add lodash
# → lodash not in any catalog# → prompts to select a catalog (or skip)# → fetches latest version, updates pnpm-workspace.yaml# → writes "lodash": "catalog:prod" to package.json# → runs vp install
And when catalogMode: prefer is configured, plain vp add follows pnpm’s native behavior for the default catalog.
It'd be nice if we added an interact TUI:
When execute vp add react. It will show a prompt that asks user which catalog should this package added to or creating a new catalog (this TUI is only for workspace which is using name catalogs)
Activity
jong-kyung commentedon Jun 15, 2026
Thanks for the request!
Vite+ already forwards pnpm catalog flags:
vp add react --save-catalogvp add react --save-catalog-name prodAnd when
catalogMode: preferis configured, plainvp addfollows pnpm’s native behavior for the default catalog.tobynguyen27 commentedon Jun 15, 2026
It'd be nice if we added an interact TUI:
When execute
vp add react. It will show a prompt that asks user which catalog should this package added to or creating a new catalog (this TUI is only for workspace which is using name catalogs)