Vite vs Webpack: Which One I'd Start a Project On

By Aakash Verma · · 3 min read

Short answer: a new project starts on Vite, and I wouldn't spend a minute debating it. An old webpack project that builds fine is a different question, and the answer there is often "not yet", or "move to Rspack instead".

Versions on the npm registry as of November 25, 2026: Vite is at 8.3.8 (November 11), webpack at 5.113.0 (November 19). webpack 5 came out in 2020 and there's still no 6, just a steady stream of 5.x releases. That says a lot about where each one is in its life.

What changed with Vite 8

The old line on Vite was "esbuild in dev, Rollup in production", and the two didn't always agree. A CommonJS dependency would work in dev and break in the build, or the other way round. That's gone. Vite 8, released March 12, 2026, runs on Rolldown, one Rust bundler for both, with Oxc as the compiler underneath. The team says builds got 10 to 30 times faster than Rollup in their benchmarks, and the announcement quotes Linear going from 46 seconds to 6.

It also ships a compatibility layer that converts existing esbuild and rollupOptions settings, so most Vite 7 projects upgrade without touching the config. Node 20.19+ or 22.12+, same as Vite 7.

For me this removes the one real argument webpack people had: "Vite's dev and prod are two different tools." They aren't anymore.

The dev server is where you feel it

This is the difference you notice on day one, and it's architectural, not a tuning thing.

webpack builds a bundle of your whole app before the dev server answers. Change a file and it rebuilds the affected part of that bundle. On a small app that's fine. On a big one with a few thousand modules, the first start is the kind of wait where you go and make tea.

Vite doesn't bundle your source in dev. It serves files as native ES modules and transforms each one when the browser asks for it, so startup cost grows with the page you open, not the whole app. Dependencies get pre-bundled once and cached. Hot updates stay fast no matter how large the project gets, because they only touch the module that changed.

Two dev server timelines: webpack bundles every module before the first page loads, Vite serves only the modules that page imports

Where webpack still wins

I don't think webpack is bad. It's old in the way a tool gets when it has handled every edge case anyone ever hit.

  • Module Federation. If you're running micro-frontends that load each other's code at runtime, webpack invented that and its version is the reference. There are Vite plugins for it, but I'd want a very good reason to bet production on them.
  • Weird loaders. Years-old projects tend to have a custom loader for some file format nobody remembers adding. Porting that to a Vite or Rolldown plugin is real work, and nobody wants to own it.
  • Frameworks that chose it. Next.js moved its default to Turbopack, Angular moved to esbuild and Vite, but plenty of company React apps from 2019 to 2022 still sit on a hand-written webpack config, and that config works.

Should you migrate an existing webpack app?

Here's how I'd decide.

If the build takes under a minute, the dev server feels OK, and nobody's fighting the config, leave it. Moving bundlers is a week of chasing environment variables (process.env.X becomes import.meta.env.VITE_X), require calls inside ES modules, and CSS imports that worked by accident. That week has to buy you something.

If the dev server takes over 30 seconds to start, or people avoid touching the webpack config because it's 400 lines with no comments, migrate. Plain React or Vue SPAs usually move to Vite cleanly.

If the config is load-bearing (Module Federation, custom loaders, plugins you can't drop), look at Rspack first. It's a Rust rewrite that keeps webpack's config format and most of its loaders and plugins, at 2.3.4 right now. You get most of the speed without the rewrite. It's the move that has the best chance of being finished on a Friday.

The one I'd pick

New project: Vite, through npm create vite@latest or whatever your framework's starter uses (Nuxt, SvelteKit, Astro, React Router and Vue all build on it). Existing webpack project: measure first, and if it hurts, Rspack before Vite when the config is complicated.

If you've got an older frontend that's slow to build and you'd rather someone else did the move, that's the kind of work I take on. Book a call and tell me what's in the webpack config.

Introductory offer

Free cloud cost optimization. You only pay from what I save.

I cut your AWS, cloud, Supabase or Vercel bill for free and keep half of what I save for 6 months. Save nothing, pay nothing. Code, architecture and infrastructure.

See the offer →