React › Build Tools & Bundlers (Vite, Webpack & CRA)
Why has Vite become more popular than Create React App for starting new React projects?
IntermediateAnswer
Vite starts a development server almost instantly because it only processes the files a page actually needs right away, instead of bundling the entire app upfront like older tools did. This means changes show up in the browser in a fraction of a second, which makes the whole development process feel much faster.
// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
});Real-world example A large team working on a project with hundreds of components switches from Create React App to Vite and notices the development server now starts in under a second instead of taking almost a minute.