ShopperCove
Menu
All writingBlogTopicsCategoriesAboutRSS
Blog
Categories
Observability & SRE62All categories
About

Plate 99

  1. Blog

Rspack vs Webpack: Which Builds Faster? 0.54s vs 4.3s

Rspack 2.2.8 vs Webpack 5.111.1 on a 201-module React fixture: cold production medians 0.54 s vs 4.33 s (~8.0x). Webpack+Babel vs Rspack+builtin:swc-loader. Raw bundles 174 KB vs 365 KB; gzip ~48 KB vs ~52 KB.

Aditya Challa·5 October 2026·5 min read

Summary
On this page
  1. What I tested
  2. Is Rspack faster than Webpack?
  3. What breaks when you migrate?
  4. Should you switch from Webpack to Rspack?
  5. Sources
  6. Related

On a 201-module React app I generated for this test, Webpack 5.111.1 with Babel 7 took a median 4.33 s for a cold production build, and Rspack 2.2.8 with builtin:swc-loader took 0.54 s on the same machine. That is about 8x.

Short answer: migrate if you already live in a Webpack config and production builds are eating CI or deploy time. Stay on Webpack, or pick Vite for a greenfield app, if you depend on a plugin Rspack does not support yet. No affiliate links in this post.

What I tested

  • Machine: 8 vCPU Intel Xeon / 15 GB RAM Linux cloud box, Node 20.19.2, tested 5 Oct 2026 (about 22:40 to 22:50 IST). Shared box; tools interleaved each round.
  • Fixture: 200 small React function components plus one entry that imports all of them (201 modules). React 18.3.1 + react-dom. JSX, no CSS, no code splitting.
  • Webpack: 5.111.1 + webpack-cli 5.1.4, babel-loader 9.2.1, @babel/core 7.28.4, @babel/preset-env + @babel/preset-react, mode: production, minify on, cacheDirectory off.
  • Rspack: @rspack/core 2.2.8 + @rspack/cli 2.2.8, builtin:swc-loader with ecmascript+jsx, mode: production, minify on. Config shape mirrors the Webpack one on purpose.
  • Timing: five interleaved cold production builds each (output dirs deleted every run). Median wall-clock for the whole CLI command.
  • One surprise: raw bundle.js was 174 KB under Webpack and 365 KB under Rspack, but gzip was close (about 48 KB vs 52 KB). Size comparisons without gzip would have lied.
  • Not tested: HMR / dev server, Module Federation, custom Webpack plugins, CSS pipelines, source maps, Windows/macOS, a real app migration.

Is Rspack faster than Webpack?

BundlerTranspileMedian cold prod buildRuns
Webpack 5.111.1Babel 7 (babel-loader)4.33 s3.84 / 6.05 / 4.33 / 3.97 / 4.39
Rspack 2.2.8builtin:swc-loader0.54 s0.61 / 0.59 / 0.53 / 0.51 / 0.54

Rspack was about 8.0x faster at the median. Webpack had one slow outlier at 6.05 s; Rspack stayed inside 0.51–0.61 s. This is the common migration pairing (Babel Webpack to SWC Rspack), not an identical-transformer A/B. If your Webpack build already uses swc-loader, expect a smaller gap than these numbers.

Bundle size on this fixture:

OutputRawGzip
Webpack dist-wp/bundle.js174,380 bytes~47.9 KB
Rspack dist-rspack/bundle.js365,234 bytes~51.9 KB

Raw size roughly doubled under Rspack's minifier here; after gzip the difference was about 8%. Ship and CDN bills care about gzip (or Brotli), so I would not block a migrate on the raw number alone, but I would check your real entry's compressed size before calling the migrate done. The Rspack 2.2.8 notes cover resolver cache and memory work in that release; the Webpack 5.111 ESM output notes are the matching Webpack baseline on this site.

What breaks when you migrate?

Rspack aims at Webpack 5-compatible config. On this fixture the swap was: change the package, point the CLI at the same entry/output shape, and replace babel-loader with builtin:swc-loader. Node must meet Rspack 2's engine range (^20.19.0 || >=22.12.0); this box was on 20.19.2.

Real projects fail on plugins and loaders Webpack has and Rspack does not, or on SWC Wasm plugins built for an older swc_core (Rspack 2.2 bumped to 77). Read the unsupported list in the official migrate guide before you delete Webpack from CI. Also re-check compressed bundle size and a smoke test of the production assets; raw size alone is a noisy signal.

If you are not on Webpack today, this is the wrong comparison. A Vite-first app should measure Vite, not force a Rspack hop. The Vite 8.3.2 post is the closer next step for that stack.

Should you switch from Webpack to Rspack?

SituationMy pick
Webpack 5 app, Babel loader, slow prod CI builds, ordinary loadersTry Rspack; keep the config shape and swap the loader
Already on swc-loader under WebpackStill try Rspack, but re-benchmark; do not expect a full 8x
Depends on a Webpack-only plugin with no Rspack portStay, or isolate that package
Greenfield SPA with no Webpack historyPrefer Vite unless you need Webpack's plugin surface
Only local rebuilds feel slowProfile HMR/dev first; this post measured cold prod only

Bottom line: on 201 modules, Rspack 2.2.8 cut a 4.3 s Webpack+Babel production build to 0.54 s, with gzipped output nearly the same size. Who should not switch yet: teams blocked on an unsupported plugin, or teams that are not on Webpack at all. Everyone else with a painful Webpack prod build should measure their own app the same way before rewriting the pipeline.

How this was made: I generated the fixture, ran every build on the ShopperCove test box, and kept the timing JSON; the write-up was drafted with AI help and checked against that output.

Sources

  • https://www.rspack.dev/guide/migration/webpack
  • https://www.rspack.dev/blog/announcing-2-2
  • https://webpack.js.org/guides/getting-started/
  • https://www.npmjs.com/package/@rspack/core
  • https://www.npmjs.com/package/webpack
  • https://swc.rs/docs/usage/swc-loader

Related

  • https://www.shoppercove.com/blog/rspack-2-2-8-resolver-cache-memory-october-2026
  • https://www.shoppercove.com/blog/webpack-5-111-esm-output-stable-september-2026
  • https://www.shoppercove.com/blog/vite-8-3-2-renderbuilturl-bundled-dev-sourcemaps-october-2026
  • https://www.shoppercove.com/blog/vite-plus-1-0-unified-toolchain-october-2026
  • https://www.shoppercove.com/blog/turborepo-2-11-7-sdkroot-oidc-cache-october-2026
  • https://www.shoppercove.com/blog/pnpm-vs-npm-vs-bun
  • https://www.shoppercove.com/blog/bun-1-4-2-elysia-als-cmyk-jpeg-october-2026
  • https://www.shoppercove.com/blog/nodejs-26-lts-october-2026-schedule-change
rspackwebpackbuild performancereactbundlersswc-loaderbabel

Lab evidence

What I found running this

Hands-on on ShopperCove box 5 Oct 2026 ~22:40-22:50 IST (8 vCPU Intel Xeon / 15 GB shared Linux, Node 20.19.2). Fixture: 200 React function components + 1 entry (201 modules), React 18.3.1. Webpack 5.111.1 + webpack-cli 5.1.4 + babel-loader 9.2.1 + @babel/core 7.28.4 + preset-env/react, mode production, minify on, babel cacheDirectory false. Rspack @rspack/core 2.2.8 + @rspack/cli 2.2.8, builtin:swc-loader (ecmascript+jsx), mode production, minify on. Cold prod builds, output dirs deleted each run, 5 interleaved rounds. Medians: webpack 4.328s (3.836/6.051/4.328/3.973/4.391); rspack 0.540s (0.612/0.590/0.526/0.513/0.540); ~8.0x. Sizes: webpack bundle.js 174380 B (~47921 B gzip); rspack 365234 B (~51864 B gzip). Gotcha: raw size ~2x under Rspack but gzip only ~8% larger. Comparison is Babel Webpack vs SWC Rspack (typical migrate path), not identical transformers. Not tested: HMR/dev server, Module Federation, custom plugins, CSS, source maps, Windows/macOS, real-app migrate. No affiliate.

Notes when a lab post goes up

Occasional email for new hands-on reviews. No sequence and no sponsors.

Related links

  • Plate 89

    Is webpack-bundle-analyzer Accurate? A 2.3x Size Gap

    webpack-bundle-analyzer 5.4.0 vs source-map-explorer 2.5.3 on one webpack 5.111 production build (148,569 B): date-fns 44,313 B vs 19,196 B (2.3x) because of module concatenation estimates; lodash 70,136 vs 70,312 B. CLI medians 313 ms vs 224 ms (JSON).

    5 Oct 2026

  • Plate 91

    tsup vs unbuild: Should You Switch? 931ms vs 2034ms

    tsup 8.5.1 vs unbuild 3.6.1 on a 150-module TypeScript library (ESM+CJS): median 931 ms vs 2034 ms (~2.2x); with .d.ts 3213 ms vs 3740 ms (~1.16x). unbuild ESM 4.9% smaller, CJS 8.3% smaller; tsup README says not actively maintained.

    5 Oct 2026

  • Plate 74

    Should You Leave Nx? 3378ms vs 1177ms

    Turbo 2.11.7 vs Nx 23.2.1 on 7 packages / 336 JS files: cold median 1177 ms vs 3378 ms (~2.9x). Warm both 7/7 local cache hits (Turbo wall ~138 ms / tool ~16 ms; Nx wall ~668 ms with daemon / tool ~31 ms).

    5 Oct 2026

On this page

  1. What I tested
  2. Is Rspack faster than Webpack?
  3. What breaks when you migrate?
  4. Should you switch from Webpack to Rspack?
  5. Sources
  6. Related
All writingBlogCategoriesTopicsAboutPrivacyRSS

© 2026 ShopperCove