Describe the bug
When a project has been partially or manually migrated to Vite+ by installing vite-plus first, vp migrate appears to treat the project as already migrated and skips the remaining core migration steps.
This can happen during manual migration workflows where the user first adds vite-plus / Vite+ dependencies and then runs vp migrate to finish the migration.
In that state, vp migrate can still merge some config into vite.config.ts such as lint, but it does not rewrite the existing Vite imports or scripts.
Expected behavior:
- vite.config.ts imports should be rewritten from vite to vite-plus
- vite/client references should be rewritten to vite-plus/client
- package scripts such as vite, vite build, and vite preview should be rewritten to vp dev, vp build, and vp preview
- the migration should only report “already using Vite+” once the project is actually migrated, not merely because vite-plus exists in package.json
Actual behavior:
- vite.config.ts still contains:
import { defineConfig } from 'vite'
- package.json scripts still contain:
{
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
}
- tsconfig.app.json still contains:
- vp lint . reports vite-plus/prefer-vite-plus-imports against vite.config.ts.
It looks like the migration completion condition may be too broad. Instead of considering the project migrated when
vite-plus is present in dependencies, vp migrate may need to verify that core migration steps have completed, or
continue running idempotent rewrites for imports, scripts, and tsconfig types.
Reproduction
https://github.com/jong-kyung/repro-vite-plus-1817
Steps to reproduce
npm create vite@latest manual-vp-migrate -- --template react-ts
cd manual-vp-migrate
npm install
npm remove vite
npm install -D vite-plus @voidzero-dev/vite-plus-core
vp migrate --no-interactive
Observed result:
- vite.config.ts still imports from vite
- scripts still call vite
- tsconfig.app.json still references vite/client
- vp lint . reports that vite-plus imports should be used
System Info
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.16.0
Source lts
Tool Paths:
node /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/node
npm /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/npm
npx /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/npx
Package Manager:
Name npm
Version 11.16.0
Source devEngines.packageManager
Source Path /Users/jong-kyung/Desktop/jklee/dev/manual-vp-migrate/package.json
Project Root /Users/jong-kyung/Desktop/jklee/dev/manual-vp-migrate
Bin Path /Users/jong-kyung/.vite-plus/package_manager/npm/11.16.0/npm/bin/npm
Used Package Manager
npm
Logs
Validations
Describe the bug
When a project has been partially or manually migrated to Vite+ by installing vite-plus first, vp migrate appears to treat the project as already migrated and skips the remaining core migration steps.
This can happen during manual migration workflows where the user first adds vite-plus / Vite+ dependencies and then runs vp migrate to finish the migration.
In that state, vp migrate can still merge some config into vite.config.ts such as lint, but it does not rewrite the existing Vite imports or scripts.
Expected behavior:
Actual behavior:
{ "dev": "vite", "build": "tsc -b && vite build", "preview": "vite preview" }It looks like the migration completion condition may be too broad. Instead of considering the project migrated when
vite-plus is present in dependencies, vp migrate may need to verify that core migration steps have completed, or
continue running idempotent rewrites for imports, scripts, and tsconfig types.
Reproduction
https://github.com/jong-kyung/repro-vite-plus-1817
Steps to reproduce
npm create vite@latest manual-vp-migrate -- --template react-ts cd manual-vp-migrate npm install npm remove vite npm install -D vite-plus @voidzero-dev/vite-plus-core vp migrate --no-interactiveObserved result:
System Info
VITE+ - The Unified Toolchain for the Web Environment: Version 24.16.0 Source lts Tool Paths: node /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/node npm /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/npm npx /Users/jong-kyung/.vite-plus/js_runtime/node/24.16.0/bin/npx Package Manager: Name npm Version 11.16.0 Source devEngines.packageManager Source Path /Users/jong-kyung/Desktop/jklee/dev/manual-vp-migrate/package.json Project Root /Users/jong-kyung/Desktop/jklee/dev/manual-vp-migrate Bin Path /Users/jong-kyung/.vite-plus/package_manager/npm/11.16.0/npm/bin/npmUsed Package Manager
npm
Logs
Validations