The Bundler Evolution: From Webpack to Rust

JavaScript bundling has evolved from simple concatenation scripts to sophisticated build pipelines that handle code splitting, tree shaking, hot module replacement, and asset optimization. Webpack defined the modern era but brought configuration complexity that frustrated developers for years. Vite arrived with a revolutionary developer experience: near-instant server starts and hot updates. Now, Rust-based bundlers (Rspack, Turbopack) promise Webpack-level compatibility with Vite-like speed.

We tested all four bundlers on three real codebases: a 50K-line Next.js application, a 30-package monorepo, and a legacy Webpack 4 codebase migrated to each tool. The benchmarks measure cold start, incremental builds, production bundle size, and memory usage.

Architecture and Philosophy

BundlerLanguageCore ArchitecturePrimary Use Case
WebpackJavaScriptPlugin-based pipeline with loader systemLegacy codebases, maximum configurability
ViteJavaScript (esbuild/Rollup)ESM-based dev server, Rollup for productionModern frameworks, developer experience
RspackRust (compatible with Webpack API)Webpack-compatible plugin system in RustPerformance-critical apps, Webpack migration
TurbopackRust (incremental computation)Incremental bundling with fine-grained cachingLarge monorepos, Next.js projects

Webpack's architecture is the most mature but also the most complex. Everything is a plugin: loaders transform files, plugins hook into compilation events. This flexibility comes at the cost of startup time and memory usage.

Vite separates development and production: esbuild pre-bundles dependencies for fast server starts, while Rollup handles production builds. The development server serves native ES modules, enabling instant hot updates.

Rspack is ByteDance's answer: a Rust reimplementation of Webpack's core with a compatible plugin API. Existing Webpack loaders and plugins work with minimal changes, providing a migration path without rewriting build configs.

Turbopack (from Vercel) uses incremental computation: it only rebuilds what changed, down to the function level. This is particularly effective in monorepos where changing one package shouldn't require rebuilding everything.

Performance Benchmarks

Tests run on a 2026 MacBook Pro M4 with 32GB RAM. The test application is a Next.js 15 site with 150 components, 50 pages, and 15 third-party libraries (React, Tailwind, Zustand, etc.).

MetricWebpack 6Vite 6Rspack 2Turbopack (Next.js 15)
Cold dev server start8.2s1.4s2.1s1.8s
Hot update (100ms after save)420ms12ms25ms8ms
Full production build45s28s22s19s
Incremental build (1 file change)3.8s1.2s0.9s0.4s
Memory usage (dev server)1.8GB820MB950MB1.1GB
Bundle size (gzipped)142KB138KB136KB140KB

The performance differences are stark. Vite's dev server starts 5.8x faster than Webpack. Turbopack's incremental builds are 9.5x faster than Webpack's. Rspack sits between Vite and Turbopack for most metrics but wins on production build time.

Memory usage tells another story: Webpack's JavaScript-based architecture consumes the most memory. Vite's split architecture (esbuild for deps, Rollup for prod) is more memory-efficient. The Rust bundlers use less memory than Webpack but more than Vite due to their more complex incremental caching systems.

Configuration Complexity

Configuration is where these tools diverge most. Here's the minimum config for each to build a React + TypeScript application:

Webpack (webpack.config.js):

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: './src/index.tsx',
  module: {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        use: 'ts-loader',
        exclude: /node_modules/,
      },
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader'],
      },
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
  },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist'),
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/index.html',
    }),
  ],
  devServer: {
    static: './dist',
    hot: true,
  },
};

Vite (vite.config.ts):

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  server: {
    port: 3000,
  },
  build: {
    outDir: 'dist',
  },
});

Rspack (rspack.config.js):

const rspack = require('@rspack/core');
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');

module.exports = {
  entry: './src/index.tsx',
  module: {
    rules: [
      {
        test: /\.tsx$/,
        use: {
          loader: 'builtin:swc-loader',
          options: {
            jsc: {
              parser: {
                syntax: 'typescript',
                tsx: true,
              },
              transform: {
                react: {
                  runtime: 'automatic',
                },
              },
            },
          },
        },
      },
    ],
  },
  plugins: [
    new ReactRefreshPlugin(),
    new rspack.HtmlRspackPlugin({
      template: './index.html',
    }),
  ],
  devServer: {
    port: 3000,
  },
};

Turbopack (Next.js 15 - next.config.js):

// Next.js 15 uses Turbopack by default in development
// No configuration needed for basic usage

module.exports = {
  // Optional: customize Turbopack settings
  experimental: {
    turbo: {
      rules: {
        '*.svg': {
          loaders: ['@svgr/webpack'],
          as: '*.js',
        },
      },
    },
  },
};

Vite requires the least configuration for modern frameworks. Webpack requires the most, with separate loaders for each file type. Rspack's configuration is similar to Webpack's but with Rust-based built-in loaders (like builtin:swc-loader). Turbopack is primarily used through Next.js, which handles configuration internally.

Framework Integration

FrameworkWebpackViteRspackTurbopack
ReactFull supportOfficial pluginOfficial pluginBuilt into Next.js
Vuevue-loaderFirst-class support@rspack/plugin-vueLimited (experimental)
Sveltesvelte-loader@sveltejs/vite-plugin-svelteCommunity pluginNot supported
Next.jsDefault (pages router)Next.js plugin for ViteNot officially supportedDefault (App Router)
RemixBuilt on esbuildNot applicableNot applicableNot applicable
NuxtLegacy supportNuxt 4+ uses ViteNot supportedNot supported

Vite has the best framework integration, with official plugins for React, Vue, Svelte, Solid, and Lit. The Vite ecosystem includes framework-specific templates and optimized configurations.

Webpack has the broadest compatibility, supporting every framework through community loaders. This is its main advantage for legacy codebases.

Rspack's framework support is growing but lags behind Vite. The React plugin is official and stable; Vue and Svelte support is community-maintained.

Turbopack is tightly coupled with Next.js. While it can theoretically bundle other frameworks, the integration work is substantial and not a priority for Vercel.

Plugin Ecosystem

Webpack's plugin ecosystem is massive: over 5,000 plugins on npm. Need to inline SVGs? Use svg-inline-loader. Need to analyze bundle size? Use webpack-bundle-analyzer. This ecosystem depth is Webpack's moat.

Vite's plugin ecosystem is smaller but high-quality. Because Vite uses Rollup for production builds, many Rollup plugins work with Vite. The plugin API is simpler than Webpack's, making it easier to write custom plugins.

Rspack's key feature is Webpack plugin compatibility. Many Webpack plugins work without modification. For plugins that don't work, Rspack provides a compatibility layer. The native plugin API is similar to Webpack's but with Rust performance.

Turbopack has a limited plugin system focused on Next.js integrations. The API is not stable for general use, and the ecosystem is nascent.

Migration Experience

Webpack to Vite: Moderate difficulty. Vite provides a migration guide and @vitejs/plugin-legacy for older browsers. The main challenges are replacing Webpack-specific loaders with Vite equivalents and updating import paths to use ESM syntax. For complex Webpack configurations, migration can take days.

Webpack to Rspack: Easy. Rspack aims for drop-in compatibility. Most Webpack configurations work with minimal changes: replace webpack with @rspack/core in imports, update loader names (ts-loader → builtin:swc-loader). Performance improvements are immediate without rewriting build logic.

Webpack to Turbopack: Only applicable for Next.js projects. Next.js 15+ uses Turbopack by default in development. Migration from Webpack-based Next.js is automatic when upgrading Next.js versions.

Vite to Rspack: Moderate difficulty. While possible, it's less common. Rspack offers better performance for large codebases but sacrifices some of Vite's developer experience polish.

Production Readiness

Webpack: Battle-tested. Used by millions of projects in production. The most stable option but also the slowest.

Vite: Production-ready since v3. Used by major frameworks (Nuxt 4, SvelteKit, Astro). The Rollup-based production bundler produces optimized output comparable to Webpack.

Rspack: Production-ready since v1.0. Used internally by ByteDance for TikTok and other applications. The Rust core provides stability and performance.

Turbopack: Beta for general use, production-ready within Next.js. Vercel uses it for nextjs.org and vercel.com. The incremental computation engine is stable, but the plugin API is still evolving.

Community and Maintenance

MetricWebpackViteRspackTurbopack
GitHub stars63k68k12k8k
Weekly npm downloads18M5M850kBundled with Next.js
First release2014202020222022
BackingOpen CollectiveEvan You (Vue team)ByteDanceVercel
Release cadenceQuarterlyMonthlyMonthlyWith Next.js releases

Webpack has the largest community but slower development pace. Vite has the most momentum and active development. Rspack and Turbopack are backed by large companies (ByteDance, Vercel) with resources for long-term maintenance.

Who Should Use What

Choose Webpack if:

  • You have a complex legacy codebase with custom Webpack configurations
  • You need specific plugins that only exist for Webpack
  • Your team has deep Webpack expertise
  • Stability is more important than performance

Choose Vite if:

  • You're starting a new project with React, Vue, or Svelte
  • Developer experience (fast server starts, instant HMR) is a priority
  • You want minimal configuration and good defaults
  • Your project uses modern JavaScript/TypeScript without legacy requirements

Choose Rspack if:

  • You have a Webpack codebase and want performance improvements without rewriting
  • You need Webpack plugin compatibility but want Rust-level speed
  • Your project is performance-critical (large codebase, frequent builds)
  • You're comfortable with a tool backed by ByteDance but with a smaller community

Choose Turbopack if:

  • You use Next.js 15+ and want the fastest possible development experience
  • You work in a large monorepo where incremental builds matter most
  • You're willing to accept some instability for cutting-edge performance
  • Your project aligns with Vercel's ecosystem (Next.js, Vercel hosting)

The Verdict

For new projects in 2026, Vite is the recommended choice. Its developer experience is unmatched, the ecosystem is mature, and performance is excellent for most use cases. The separation between development (esbuild) and production (Rollup) has proven effective, and framework integration is best-in-class.

Rspack is the best choice for migrating from Webpack. Its compatibility layer allows teams to get Rust-level performance without abandoning their Webpack configuration and plugin investments. For performance-critical applications where every second of build time matters, Rspack delivers.

Turbopack shows incredible promise, especially for Next.js users. Its incremental computation engine is technically impressive, and when it works, the development experience is magical. However, it remains a Next.js-focused bundler rather than a general-purpose tool.

Webpack remains the safe choice for complex, legacy codebases. Its plugin ecosystem and configuration flexibility are still unmatched. However, for greenfield projects, the performance and developer experience gaps are too large to ignore.

The bundler landscape will continue to evolve. Webpack 7 (in development) promises performance improvements, and esbuild (which powers Vite's dev server) continues to get faster. What's clear is that the era of slow JavaScript builds is ending, and developers have excellent choices regardless of their constraints.

For related build-pipeline benchmarks, see our comparisons of Turborepo vs Nx vs Lerna for monorepo task orchestration and Bun vs Node vs Deno in 2026.

Frequently Asked Questions

Which JavaScript bundler is best in 2026: Webpack, Vite, Rspack, or Turbopack?

Vite scores highest in our 2026 review at 9.2/10 and wins for developer experience and framework ecosystem on new React, Vue, and Svelte projects. Rspack takes second place at 8.9/10 as the best choice for performance-critical apps and teams migrating from Webpack without rewriting build configs. Turbopack scores 8.1/10 and excels at incremental builds inside Next.js 15+ monorepos, while Webpack scores 7.5/10 and remains best suited to complex legacy codebases that depend on its 5,000+ npm plugins.

How fast are Vite, Rspack, Turbopack, and Webpack in 2026 benchmarks?

On a 2026 MacBook Pro M4 (32GB RAM) building a Next.js 15 app with 150 components, 50 pages, and 15 third-party libraries, Vite 6 recorded the fastest cold dev server start at 1.4s, followed by Turbopack at 1.8s, Rspack 2 at 2.1s, and Webpack 6 at 8.2s. Turbopack led hot updates at 8ms and single-file incremental builds at 0.4s, ahead of Vite (12ms HMR, 1.2s incremental), Rspack (25ms HMR, 0.9s incremental), and Webpack (420ms HMR, 3.8s incremental). For full production builds, Turbopack finished in 19s, Rspack in 22s, Vite in 28s, and Webpack in 45s.

How much memory do Webpack, Vite, Rspack, and Turbopack use, and how do bundle sizes compare?

During development server runs on our Next.js 15 benchmark app, Vite 6 used the least memory at 820MB, followed by Rspack 2 at 950MB, Turbopack at 1.1GB, and Webpack 6 at 1.8GB. Gzipped production bundle output was tightly grouped across all four tools: Rspack produced 136KB, Vite 138KB, Turbopack 140KB, and Webpack 142KB.

Can I use Vite with Next.js, or is Turbopack required?

Next.js 15+ uses Turbopack by default for development and the App Router with zero configuration required. A community @vitejs/plugin-next package exists, but migrating an existing Next.js project to Vite requires custom configuration changes and does not support every Next.js feature.

Is Rspack compatible with existing Webpack loaders and plugins?

Yes, for most setups. Rspack reimplements Webpack's core in Rust with a compatible plugin API, so many Webpack plugins and loaders work with minimal edits: swap webpack for @rspack/core in imports and replace ts-loader with Rspack's built-in Rust loader (builtin:swc-loader). Plugins that depend on internal Webpack APIs may require adjustments, which the Rspack team tracks in a compatibility list on GitHub.

How does Turbopack's incremental computation work?

Turbopack builds a fine-grained dependency graph of your application and caches computation results down to the function level. When you edit a file, Turbopack recomputes only the affected nodes in that graph rather than rebuilding whole packages, which makes incremental builds 9.5x faster than Webpack in our monorepo and Next.js benchmarks.

How do these bundlers compare to standalone esbuild and Bun's built-in bundler?

Vite uses esbuild under the hood to pre-bundle dependencies in development and pairs it with Rollup for production builds because standalone esbuild lacks default code splitting and has a smaller plugin API. Bun includes a fast Zig-based bundler that works well for simple projects, whereas Vite and Rspack provide the mature plugin ecosystems and framework integrations required by complex production applications.

[AFFILIATE:vite] Get Started with Vite · [AFFILIATE:rspack] Try Rspack · [AFFILIATE:webpack] Webpack Documentation