Replace react-scripts dependency with Vite
ProprietaryAdds vite and @vitejs/plugin-react as dev dependencies of projects that depend on react-scripts, and removes react-scripts unless a script other than eject still invokes it (for example react-scripts test, which the stock Create React App template keeps, so the dependency usually stays until the tests move to Vitest). Packages that use craco, react-app-rewired or wrapped start or build scripts are left unchanged. The lock file is not regenerated; run your package manager afterwards.
org. openrewrite. react. cra-to-vite. replace-react-scripts-dependencyOptional
The version range of vite to add. Vite 7 needs Node 20.19 or later.
The version range of @vitejs/plugin-react to add. It must accept the vite range above.
mod run . --recipe= org. openrewrite. react. cra-to-vite. replace-react-scripts-dependencyInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.