Instead of webpack: Vite
Use Vite for new front-end projects and for webpack apps you can afford to reconfigure. Its dev server serves your source on demand over native ES modules, so start-up stays fast as the app grows, and since Vite 8 one Rust bundler, Rolldown, handles both development and production. If you have a large webpack config you cannot rewrite, move to Rspack instead, which keeps webpack's API.
Both are for bundling JavaScript, CSS and assets for the browser, with a dev server for local work.
Why Vite is better
- Vite pre-bundles dependencies once and serves your own code as native ES modules on request, so it does not bundle the whole app before the first page loads. Hot updates replace only the edited module.
- Vite 8, released in March 2026, builds with Rolldown. The Vite team measures it at 10-30x faster than Rollup, with the same plugin API.
- TypeScript, JSX, CSS and asset imports work without loaders, and React Fast Refresh and Vue hot reloading come preconfigured in the create-vite templates. A webpack setup needs a loader rule for each of those.
- Nuxt, SvelteKit, Astro, React Router, Vitest and Storybook, and the Laravel and Ruby on Rails asset pipelines all build on it.
- Vite is downloaded 65 million times a week, so plugins, answers and hires are easy to find.
When to keep webpack
Keep webpack when your build depends on custom loaders and plugins written against its API, or on a framework that still runs on it. The State of JS 2025 survey still finds webpack the most-used build tool. It is maintained and works; it is slower to build and heavier to configure.
Switching
Moving to Vite is a reconfiguration, not a drop-in. You replace webpack.config.js with a short vite.config file, swap loaders for Vite plugins or built-in handling, move index.html to the project root as the entry point, and change process.env reads to import.meta.env with a VITE_ prefix. Moving to Rspack is closer to a rename, since it supports most webpack options and loaders, and its migration guide covers the rest.
Watch out
Vite only transpiles TypeScript and does not type-check it, so run tsc in CI or your editor. Development serves unbundled modules while production is bundled, so always test the production build. Rolldown replaced esbuild and Rollup only in Vite 8, and most plugins work with it, but check older ones.
Also worth a look
- Rspack A Rust bundler that keeps webpack's configuration and plugin API; pick it when you have a large webpack config you cannot afford to rewrite.
More newer, better JavaScript bundlers, compilers and build tools
Sources
- Vite: Why Vite
- Vite: Features
- Vite 8.0 is out
- Rspack: Introduction
- State of JavaScript 2025: Build Tools
- webpack, Wikipedia
Judged on 2026-11-06. See every javaScript bundlers, compilers and build tools, or all 66 replacements.