packages/vite/src/migrations/update-23-0-0/ensure-vitest-package-migration.md
Migration that runs automatically when upgrading to Nx 23. It is a safety net for workspaces that still have @nx/vite vitest artifacts in place after the optional v22 migration.
@nx/vitest: added to devDependencies when vitest is detected in the workspace (skipped when already present or when the workspace does not use vitest at all).@nx/vite:test to @nx/vitest:test: updates every project.json target and every targetDefaults entry that still references the removed executor.@nx/vite/plugin registrations: vitest-related options (testTargetName, ciTargetName, ciGroupName) are extracted from each @nx/vite/plugin entry and moved to a new @nx/vitest plugin entry. The vite entry is updated to retain only build/serve/preview options.@nx/vitest plugin: for workspaces that used @nx/vite/plugin in its default configuration (no vitest options), a matching @nx/vitest plugin entry is added automatically so vitest targets continue to be inferred.The vitest support that previously lived in @nx/vite (the @nx/vite:test executor, the @nx/vite:vitest generator, and the vitest target inference in @nx/vite/plugin) was removed in Nx 23 and is now exclusively provided by the @nx/vitest package. See the Migrating from @nx/vite guide.
Run nx migrate and this migration will handle the conversion automatically. To verify the result, check nx.json, your project.json files, and package.json after running migrations.