The question behind a Vite migration is not whether it is faster than webpack, but where the seconds it saves land and what buying them costs. So we built one React 19 application three times over, at 100, 400 and 1,000 components, with webpack 5.112.2, Rspack 2.3.2 and Vite 8.3.8, on a single cloud VM with two pinned CPU cores, on 11 November 2026. At the largest size the median production build took 23.408 s under webpack, 1.647 s under Rspack and 1.509 s under Vite, over five timed runs each. The dev-server number a developer actually waits on, every statically imported module fetched by the browser, came out at 12.927 s, 1.916 s and 7.558 s in the same order. Both result files are published in full, the build and dev timings and the bundle sizes. What they say about a migration proposal is not what the headline ratios say: the case for leaving webpack 5 is strong, and the case for Vite in particular is narrower than the published ratios, because Rspack bought most of the same seconds without re-shaping the config, and because Vite’s dev-server lead over webpack falls from 10.7x to 1.71x once the browser has finished pulling 2,069 modules.


Don't miss new tech stories on Google
Add Tech Insider once in the Google app and our stories appear in your news suggestions.
The dev server answers twice: 1.117 s to serve the page, 7.558 s to finish 2,069 requests
There are two dev-server numbers here, not one. Time from launching the server until index.html is served, at 1,000 components: Vite 1.117 s, Rspack 1.252 s, webpack 11.913 s. That is the 10.7x headline. Time until a client has fetched every module the page statically imports, six requests in flight at a time, the way a browser loads it: Vite 7.558 s, webpack 12.927 s, Rspack 1.916 s. At that point the gap between Vite and webpack is 1.71x, and Rspack finishes the same phase 3.9x faster than Vite.
The request counts explain it. Vite’s page issued 224, 839 and 2,069 requests at the three sizes, because its dev server serves source over native ES modules and pre-bundles dependencies with Rolldown rather than handing the browser a finished bundle. The two bundling dev servers issued a single request at every size. Vite moves per-module work out of startup and into the browser’s first load, which is where most of the wait reappears on a large app.
Edit-to-refresh time is not in this run; we measured cold start and first load, not hot updates. Vite’s feature documentation puts an HMR update at under 50ms from save to screen, which is a different quantity from either dev column above: Vite’s dev server ran here with React Fast Refresh while the webpack and Rspack dev servers ran plain hot module replacement, so those two columns compare startup and first page load only.
The gap depends on how big your app already is: 7.6x at 100 components, 15.5x at 1,000
Component count changes the answer, and it changes it in one direction only. At 100 components (109 modules of our own) webpack’s median production build was 10.405 s against Vite’s 1.362 s, a gap of 7.6x. At 400 components (424 modules) it was 14.094 s against 1.618 s, 8.7x. At 1,000 components (1,054 modules) it was 23.408 s against 1.509 s, 15.5x. The ratio widens because only one of the two curves moves: webpack’s build grew 2.25x across a tenfold increase in components, while Vite’s sat flat inside its own run-to-run spread of 26% to 37%.
Those are medians of five timed runs after a warm-up, with caches and the output directory removed before every run, and the medians are the part we stand behind: webpack’s 1,000-component build ranged from 21.259 s to 68.952 s. Rspack was the quickest at the two smaller sizes, 0.876 s and 1.247 s, rising to 1.647 s at 1,000 components, though not uniformly the steadiest: its 400-component build spread 79.6% between minimum and maximum against Vite’s 37%.
All of it ran on one Ubuntu 22.04.5 virtual machine (DO-Premium-Intel, two of four cores pinned to the work, a 3 GB memory cap, Node v26.13.0, npm 11.20.0), with React 19.3.1 and react-dom 19.3.1 under all three tool chains. We installed Vite 8.3.8. The version header on Vite’s own blog read v8.3.7 when we checked it on 12 November 2026, so every Vite figure here is for the 8.3.8 we installed, not for the version that header names.
| Tool and app size | Production build (s) | Peak build memory (MB) | Dev server ready (s) | All modules fetched (s) |
|---|---|---|---|---|
| Vite 8.3.8, 100 components | 1.362 | 138.102 | 0.987 | 2.511 |
| Vite, 400 components | 1.618 | 162.664 | 1.04 | 4.275 |
| Vite, 1,000 components | 1.509 | 216.211 | 1.117 | 7.558 |
| webpack 5.112.2, 100 components | 10.405 | 408.914 | 5.425 | 5.852 |
| webpack, 400 components | 14.094 | 532.133 | 8.391 | 8.865 |
| webpack, 1,000 components | 23.408 | 686.648 | 11.913 | 12.927 |
| Rspack 2.3.2, 100 components | 0.876 | 133.387 | 0.948 | 1.227 |
| Rspack, 400 components | 1.247 | 153.777 | 0.927 | 1.352 |
| Rspack, 1,000 components | 1.647 | 182.383 | 1.252 | 1.916 |
Peak build memory: 686.648 MB for webpack against 216.211 MB for Vite
Peak resident memory of the build process went 408.914 MB, 532.133 MB and 686.648 MB for webpack across the three sizes; 138.102 MB, 162.664 MB and 216.211 MB for Vite; 133.387 MB, 153.777 MB and 182.383 MB for Rspack. At 1,000 components webpack needed 3.2x Vite’s peak and 3.8x Rspack’s, and its own appetite grew 1.68x across the three sizes against Vite’s 1.57x from a much lower base.
All three fitted inside our 3 GB cap, so at this app size the question is headroom rather than failure: webpack’s 686.648 MB does not fit a 512 MB runner at all and leaves little margin on a 1 GB one, while Vite and Rspack clear both comfortably. These are also the steadiest rows we recorded, spreading 0.8% to 21.4% between minimum and maximum against up to 203.7% on the timings, which makes them the most repeatable rows in the run.
A 17.8% bundle gap that gzip shrinks to 1.9%
At 1,000 components webpack wrote 765,585 bytes of JavaScript and CSS to disk against Vite’s 650,045 and Rspack’s 648,082, so webpack’s output is 17.8% larger than Vite’s. Compressing the same files with gzip at level 6 takes that difference almost entirely away: 100,028 bytes against 98,181 and 99,556, a spread of 1.9%. The small app behaves the same way, 276,713, 262,479 and 260,641 bytes raw, compressing to 74,035, 71,654 and 72,581.
The one structural difference is where the CSS goes. webpack emitted a single file at all three sizes with zero bytes of separate CSS, because our webpack chain ran style-loader 4.0.0 and css-loader 7.1.5 rather than webpack’s built-in CSS handling; Vite and Rspack each emitted two files with the CSS extracted, 1,666, 6,766 and 16,965 bytes of it under Vite and a byte less at each size under Rspack. That row is a configuration choice rather than a capability gap, and the configuration has moved: webpack’s experiments page, checked on 11 November 2026, says built-in CSS support is “on by default since webpack 5.109.0, so .css files need no configuration and no loader”, replacing css-loader, style-loader and mini-css-extract-plugin. What the byte counts are not is a reason to migrate: after compression the measured difference is under two percent.
The compressed row above is gzip at level 6, the only setting we ran here; which encoding a server ships is a separate decision from which bundler produced the bytes, and our compression testing on real files covers it.
Rspack 2 built the same 1,054 modules in 1.647 s, without re-shaping the config
Rspack 2.3.2 posted builds of 0.876 s, 1.247 s and 1.647 s, dev servers ready in 0.948 s, 0.927 s and 1.252 s, and fully loaded pages at 1.227 s, 1.352 s and 1.916 s. It had the lowest peak build memory and the quickest fully loaded dev page at all three sizes, and the quickest production build and dev-server start at the two smaller ones; at 1,000 components Vite edged it on both of those, 1.509 s against 1.647 s on the build and 1.117 s against 1.252 s to serve index.html. Against webpack at that size Rspack was 14.2x quicker to build and 6.7x quicker to a fully loaded dev page.
What makes that interesting is what it cost to get. Rspack keeps webpack’s configuration model. Our install was three packages (@rspack/core and @rspack/cli 2.3.2, @rspack/dev-server 2.2.2) against eleven for the webpack chain, which needed babel-loader 10.1.1, @babel/core 8.1.0 and three Babel presets to compile the same TSX files that Rspack handled with no added loader package at all.
Its output is effectively Vite’s. At 1,000 components Rspack wrote 648,082 bytes to disk against Vite’s 650,045, and 99,556 bytes gzipped against 98,181, two output files each.
Neither Turbopack nor stand-alone Rolldown was in this run; our Vite 8 vs Rspack vs Turbopack comparison covers that matchup. Vite 8 already builds with Rolldown, so the Vite column is partly a Rolldown result, and Vite’s own Vite 8 announcement dates that integration: a Vite 8 beta with Rolldown fully integrated shipped in December 2025, stable Vite 8 followed in March 2026, and Rolldown replaced esbuild and Rollup as the single bundler for dev and production. The same announcement puts that bundler at 10 to 30 times faster than the Rollup it replaces, “matching esbuild’s performance level”. State of JS 2025 records Rolldown’s name recognition rising from 33% to 51% awareness, and its build tools report says of Turbopack that its usage is growing on the back of Next.js while its “satisfaction ratio is quite worrying”.
The documented blockers, and the surfaces a migration touches
None of the measurements above decides anything if one of these does. Each row is the projects’ own documentation, not received wisdom.
| Constraint | What the documentation says | Which way it points |
|---|---|---|
| Browser floor | Vite’s production default targets Baseline Widely Available: Chrome and Edge 111 or newer, Firefox 114, Safari 16.4. webpack “supports all browsers that are ES5-compliant”. | Below that floor Vite needs @vitejs/plugin-legacy, which generates legacy chunks and polyfills loaded only by browsers without native ESM. |
| Module Federation | webpack documents it as a core concept, with ModuleFederationPlugin on top of the lower-level ContainerPlugin and ContainerReferencePlugin. | If runtime module sharing between separately deployed apps is load-bearing, it is native where you already are. |
| Assets no JavaScript file references | Laravel, which replaced webpack-powered Mix with Vite in new installs, says Vite “lacks some features that Laravel Mix supports, such as the ability to copy arbitrary assets into the build that are not referenced directly in your JavaScript application”. | Audit the build for files only a server template points at before you commit. |
| Type checking | Vite’s docs, checked on 11 November 2026, say Vite “only performs transpilation on .ts files and does NOT perform type checking”, and that it transpiles TypeScript with Oxc Transformer rather than esbuild. | tsc –noEmit stays a separate CI step whichever tool wins. webpack via babel-loader and Rspack did not type-check in our runs either. |
One failure mode is worth planning for before the switch rather than after it. Vite’s build guide says Vite emits a vite:preloadError event when a dynamic import fails to load, and calling event.preventDefault() stops the error being thrown. That is the hook for the stale-chunk case a mid-session redeploy creates, and handling it is work somebody on the team has to own.
Runtime floors to clear before you start
Two runtime floors come first. Vite’s guide says Vite requires Node.js 20.19+ or 22.12+, and webpack’s getting-started guide says webpack-cli 7 requires Node.js 20.9.0 or later. We ran Node v26.13.0 and npm 11.20.0, so neither floor was in play here, but a CI image on an older Node will stop a trial on its first command.
Side by side: what each tool asks you to configure
Beyond the blockers, the two tools differ in where the work sits. The rows below are each project’s own documentation, with our run’s dev-server behaviour where it applies.
| Surface | Vite 8 | webpack 5 |
|---|---|---|
| Build engine | Vite’s guide: “A build command that bundles your code with Rolldown”. | webpack’s concepts page: a static module bundler that builds a dependency graph from one or more entry points. |
| Dev server | Native ES modules with Rolldown pre-bundling of dependencies; 224, 839 and 2,069 requests for the first page in our run. | Serves a bundle; one request at every size in our run. |
| Configuration | Build options go through build.rolldownOptions, chunk splitting through build.rolldownOptions.output.codeSplitting. | Not required since 4.0.0, and mode defaults to production. |
| CSS and HTML | index.html is the entry point and part of the module graph. | Built in and on by default; an HTML file can be the entry with no plugin needed to produce the page. |
| TypeScript | Transpiled by Oxc Transformer, no type checking. | babel-loader with the Babel TypeScript preset in our run, no type checking. |
| Extension model | Vite’s plugin docs: “Vite plugins are an extension of Rollup’s plugin interface”. | webpack’s getting-started guide calls it a good fit for a customizable build pipeline that integrates loaders and plugins. |
| Scaffolding | Projects can be created without interactive prompts with the –no-interactive flag. | create-webpack-app. |
What a move to Vite 8 actually edits
If you do migrate, these are the surfaces you touch in Vite 8. Builds are configured through build.rolldownOptions, chunk splitting through build.rolldownOptions.output.codeSplitting. The default minifier is oxc, with terser and esbuild still selectable. The CLI’s default transpile target is the named preset baseline-widely-available. TypeScript is transpiled by Oxc Transformer rather than esbuild, and index.html is the entry point and part of the module graph instead of a file sitting in public. The dev server also carries an –experimentalBundle full bundle mode that Vite’s CLI reference labels highly experimental. For non-browser libraries or advanced build flows, Vite’s build guide points at tsdown or Rolldown directly rather than its own library mode.
Three more surfaces differ from a webpack project in ways that touch application code rather than the config file. Environment variables follow a naming convention: Vite’s env and mode guide states that “only variables prefixed with VITE_ are exposed to your Vite-processed code”. The extension point is Rollup’s, since Vite’s plugin documentation says “Vite plugins are an extension of Rollup’s plugin interface”, with the @vitejs organisation maintaining the first-party React plugin that supplies Fast Refresh, a Vue plugin and the legacy-browser plugin. And if one build has to serve browser, Node and edge targets, there is the Environment API. Vite 6, which introduced it as an experimental API, was published on 26 November 2024 according to Vite’s blog feed, checked on 12 November 2026, and the guide says it “allows users to configure their app during build and dev to map all of its environments”.
What staying on webpack 5 costs in configuration now
Staying put costs less configuration than this comparison used to charge webpack. It has not required a config file since 4.0.0, mode defaults to production, and CSS and HTML are built in and on by default, so an HTML file can be the entry and no plugin is needed to produce the page. webpack’s getting-started guide points at create-webpack-app for scaffolding, and Vite’s own guide says a project can be created “without interactive prompts” using the –no-interactive flag.
The project is also still shipping. The webpack 5.112 release post, dated 13 October 2026, says the release helps with debugging imports, loading the right styles during server rendering and publishing libraries with several entry modules, and adds plugins for multiple configurations. Our webpack column ran 5.112.2.
Environment variables show how far the webpack configuration surface has shrunk, because webpack has a prefix convention of its own. webpack’s module variables page, checked on 11 November 2026, lists mode, EnvironmentPlugin, DefinePlugin and DotenvPlugin, which “Loads variables from .env files” and exposes “Only variables with the specified prefix (default: WEBPACK_ )”. DefinePlugin is therefore one of several routes for getting a variable into the bundle rather than the only one, and in both ecosystems a prefix limits which variables your code can see.
The exact commands behind every number on this page:
# Vite 8.3.8
npm install --save-exact react react-dom vite @vitejs/plugin-react
npx vite build
npx vite --port 5173 --strictPort
# webpack 5.112.2
npm install --save-exact react react-dom webpack webpack-cli webpack-dev-server \
html-webpack-plugin babel-loader @babel/core @babel/preset-env \
@babel/preset-react @babel/preset-typescript style-loader css-loader
npx webpack --mode production
npx webpack serve --mode development --port 5173
# Rspack 2.3.2
npm install --save-exact react react-dom @rspack/core @rspack/cli @rspack/dev-server
npx rspack build --mode production
npx rspack serve --mode development --port 5173
21.9 seconds a build, costed over a thousand CI runs
At 1,000 components the per-build difference is 23.408 s minus 1.509 s, or 21.899 s against Vite, and 21.761 s against Rspack. Over 1,000 production builds that is 21,899 s of pipeline time saved against Vite and 21,761 s against Rspack. The case weakens as the app shrinks: the delta is 12.476 s per build at 400 components (12,476 s per 1,000 builds) and 9.043 s at 100 components (9,043 s).
On the developer’s side the saving per dev-server restart at 1,000 components is 10.796 s against Vite and 10.661 s against Rspack. That is a far smaller number than the CI one, and it should be quoted next to it in any proposal.
Two limits on that arithmetic. None of the three tools type-checked in these runs, so a project that runs tsc adds the same cost to every column and compresses the ratio. And webpack’s persistent cache was cleared before every run, which is the right comparison for a CI container that starts clean and the wrong one for a laptop that keeps its cache warm all day. The labour side sits outside what we measured entirely: our fixture has one entry point and ES modules throughout, so it says nothing about what a monorepo with several entries and CommonJS sources costs in engineer-days.
Which tool for which codebase
A new React and TypeScript app with no legacy browser requirement: Vite 8.3.8. It produced the fastest production build at 1,000 components, 1.509 s, with no loader chain to assemble, and the 2,069-request first page load is a once-per-restart cost rather than a per-save one.
An existing webpack app of a few hundred components with a configuration that works: try Rspack 2.3.2 before you try Vite. At 400 components it cut the build from 14.094 s to 1.247 s and the fully loaded dev page from 8.865 s to 1.352 s; at 1,000 components, from 23.408 s to 1.647 s and from 12.927 s to 1.916 s, all while keeping webpack’s configuration model. That is the smallest change we measured for the largest gain, and it does not spend a quarter rewriting the build.
An estate that depends on native Module Federation, on browsers below Vite’s Chrome 111 floor without plugin-legacy, or on copying assets that no JavaScript file references: stay on webpack 5.112.2. Native CSS and HTML are on by default, and environment variables have a built-in prefix convention, which removes much of the loader and plugin tax the old version of this comparison charged it with.
A CI-constrained team: decide on memory as much as on time. 686.648 MB of peak build memory against 216.211 MB is a container-sizing decision before it is a speed one, and 21,899 s of pipeline time per 1,000 builds is the line that belongs in the proposal.
A small app, under roughly 100 components: the saving is 9.043 s a build and 4.438 s a dev-server restart. Worth taking on a new project, hard to defend as a migration quarter.
Before committing to any of it, run the same protocol on your own repository: clear the cache and output directory, one warm-up, five timed production builds, report the median, and record the peak RSS of the build process. A much smaller ratio on your codebase is a different decision from the 15.5x we measured on a generated one.
Adoption and framework defaults: webpack still leads on usage
Every measurement on this page comes from the run above or from a source named in the sentence that uses it; the two illustrative figures that do not (the common 512 MB and 1 GB CI runner limits) are assumptions, and are used as nothing more.
The adoption claim needed the biggest correction in this refresh. State of JS 2025 still has webpack ahead on usage at 86.4% against Vite’s 84.4%, and the survey’s build tools commentary says the overtake its author expected in this edition now looks another year away. Where Vite wins outright is satisfaction, 98% against webpack’s 26%, and it has overtaken React to become the second most-used item in the whole survey.
| State of JS 2025 measure | webpack | Vite | Source |
|---|---|---|---|
| Usage | 86.4% | 84.4% | Libraries rankings |
| Satisfaction ratio | 26% | 98% | Library tier list |
| Times named as a build-tool pain point | 99 | 57 | Build tools report |
Part of that usage arrives with a framework rather than through a per-project decision. Each row below is the framework’s or platform’s own documentation, and Vite’s blog feed adds Astro and SolidStart to the list.
| Framework or platform | Where it sits on the bundler question | Source |
|---|---|---|
| Angular 17 and later | Moved its builders onto “esbuild and Vite” | Angular’s build system migration guide |
| Nuxt | Lists Vite as the default bundler, with webpack and Rspack as the alternatives | Nuxt’s builders documentation |
| Remix | “No longer uses its own, closed compiler” and uses Vite instead | Remix’s future flags page |
| SvelteKit | “SvelteKit projects are built with Vite”, which is also why Vite plugins work in a SvelteKit project | SvelteKit’s integrations documentation |
| Astro and SolidStart | Listed with SvelteKit and Hydrogen as projects that “are all built with Vite” | Vite’s blog feed |
| Laravel | Vite replaced the webpack-powered Mix in new installs | Laravel’s Vite documentation |
| Create React App | The webpack-based starter shows a deprecation warning when you install a new app, and the React team sends new projects to Vite or Next.js | React’s post sunsetting Create React App, 14 February 2025 |
Some of the old page survives because it is still true and still sourced. Configuration remains the ecosystem’s top build-tool pain point in State of JS 2025, with 329 answers naming it against 224 for cognitive overload, and the survey records webpack named directly as a pain point 99 times and Vite 57 times. The shorthand that Vite needs no configuration was always an overstatement.
How we ran it, and where your seconds will differ
A deterministic generator writes the app at each size: 100, 400 or 1,000 components, each in its own .tsx file with typed props, useState and useMemo, importing up to two lower-numbered components; 20 components per page, an App that switches pages, one shared utils module and one stylesheet with a rule per component. That produces 109, 424 and 1,054 modules of our own on top of the dependency tree. Each tool got its own node_modules and the identical source tree.
Caches and the output directory were removed before every run; one warm-up, then five timed runs, median reported with minimum and maximum. None of the three tools type-checks, so no column carries a type-check cost. Dev-server cold start is measured to index.html being served; the second dev figure runs a client that walks the page’s static import graph six requests at a time. Bundle size is the JavaScript and CSS on disk after a production build, and the same files at gzip level 6. The run produced 36 timing rows and 9 bundle rows on 11 November 2026, both files linked above.
Where your numbers will move: the VM is shared, so absolute times carry noise and 5 of the 36 timing rows spread more than 50% between minimum and maximum, which is why every figure here is a median and why the ratios are the part that travels. Vite’s dev server ran with React Fast Refresh while webpack’s and Rspack’s ran plain HMR, and hot-update time was not measured. And the app is generated: one entry point, no CSS framework, no heavy dependency tree, so a real codebase will land somewhere else on all three columns.




