All writing
4 min read

create-react-app Is Slow — I Switched to Vite

Scaffolding a React app with create-react-app took me three to four minutes every time. Vite does it in under a minute, with a dev server that actually feels instant.

ReactViteTooling

For years, every React project I started began the same way: npx create-react-app. It does what it says — template files, a dev server, a working environment — but I had grown quietly frustrated. Spinning up a barebones app took three to four minutes every single time. Then I tried Vite, and I am not going back.

What Vite actually is

Vite is a build tool — the same job Webpack does under the hood for create-react-app. The difference is how it gets there. Instead of bundling your whole app before serving it, Vite serves native ES modules in development and only bundles for production. That is why the dev server starts almost instantly and hot updates feel immediate.

Scaffolding a React app

Vite started life in the Vue world, but it ships templates for plenty of frameworks now. To get a React app, set the template to react:

bash
npm create vite@latest vite-react-app -- --template react

Then jump in, install, and start the dev server:

bash
cd vite-react-app
npm install
npm run dev

Open the browser and you get the familiar React starter — logo, a counter button, the works — except it got there in seconds.

The templates you can pick from

Vite is not React-only. The --template flag accepts a whole list, with a TypeScript variant for each:

text
vanilla   vanilla-ts
vue       vue-ts
react     react-ts
preact    preact-ts
lit       lit-ts
svelte    svelte-ts

Was it worth it?

Installing and booting on a local server took me about 55 seconds, start to finish. The speed alone sold me for prototypes and small apps. I would still benchmark it on something large before betting a big project on it — but for the day-to-day of starting something new, Vite has replaced create-react-app for me completely.


Written by Fady Ehab Amer

Get in touch →

Keep reading