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.
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:
npm create vite@latest vite-react-app -- --template reactThen jump in, install, and start the dev server:
cd vite-react-app
npm install
npm run devOpen 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:
vanilla vanilla-ts
vue vue-ts
react react-ts
preact preact-ts
lit lit-ts
svelte svelte-tsWas 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
Theming Without a Build Step: How NYX Uses color-mix()
I built NYX, a zero-dependency component framework, so a whole theme can be retuned from a handful of custom properties — no Sass, no recompile, live in the browser.
What Building an OTP Input Taught Me About Controlled Components
Auto-advance, paste, and backspace look trivial until you build them — here are the controlled-input lessons that survive every form I ship.