web-infra-dev/rspack
 Watch   
 Star   
 Fork   
4 days ago
rspack

v2.3.3

Highlights

Breaking change: webpack-compatible HTTP lockfiles

HTTP module lockfiles and content cache filenames now match webpack, allowing existing webpack lockfiles and cached resources to be reused together. The previous Rspack format is no longer supported: delete the old HTTP lockfile and content cache, rebuild with experiments.buildHttp.frozen: false, then review and commit the regenerated files before re-enabling frozen builds. See #16656.

Better tree shaking for dynamic imports

Rspack now tracks member usage through destructured dynamic-import namespaces, allowing unused nested exports to be removed more precisely. This covers awaited imports, destructured .then() parameters, and Promise.all() results. See #16574.

Faster HMR-enabled builds with repeated dynamic imports

Projects with many import() expressions targeting the same module avoid repeated chunk-group scans during HMR-enabled compilation. Rspack now caches loading-chunk lookups and reuses sibling chunk lists, addressing a compilation bottleneck that grew rapidly with the number of imports. See #16674.

Shared loader cache across compilers

Rspack now shares loader cache results between compilers in the same process. For example, in an SSR build, the client and server compilers can reuse loader transformations for shared source files, avoiding repeated work. Compilers can share results when using memory cache or the same persistent cache directory. See #16558.

What's Changed

Breaking Changes 🍭

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.3.2...v2.3.3

11 days ago
rspack

v2.3.2

Highlights 💡

More reliable HMR, fewer full-page reloads

HMR now handles code-splitting changes more reliably, reducing unnecessary full-page reloads when chunks are added or rearranged. Newly required chunks are loaded before HMR accept callbacks run, and changes to async chunk dependencies no longer cause unnecessary update propagation.

Experimental rule.as

The experimental rule.as option lets a matched resource use a different path for subsequent rule matching while preserving the original resource for file reading and loaders. For example, as: '[resource-path].txt' lets later .txt rules also process example.source.js. (#15917)

// rspack.config.mjs
export default {
  module: {
    rules: [
      {
        test: /\.source\.js$/,
        type: 'asset/source',
        as: '[resource-path].txt',
      },
      { test: /\.txt$/, use: './text-loader.js' },
    ],
  },
};

Here, example.source.js matches the later .txt rule as example.source.js.txt; text-loader.js still receives the contents of the original file.

Skip side-effect-free export * passthrough modules

Rspack can now bypass side-effect-free modules that only forward exports with export *, connecting directly to the underlying module.

Mark the package as side-effect-free in package.json:

{
  "sideEffects": false
}
// src/value.js
export const value = 42;

// src/passthrough.js
export * from './value.js';

// src/index.js
export * from './passthrough.js';

With optimization.sideEffects enabled (the default in production), the export * connection from index.js can now go directly to value.js, skipping passthrough.js.

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.3.1...v2.3.2

18 days ago
rspack

v2.3.1

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.3.0...v2.3.1

23 days ago
rspack

v2.3.0

What's Changed

🎉 See Announcing Rspack 2.3 for more details.

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.9...v2.3.0

25 days ago
rspack

v2.3.0-rc.0

What's Changed

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.3.0-beta.1...v2.3.0-rc.0

2026-10-22 16:12:00
rspack

v2.3.0-beta.1

What's Changed

Breaking Changes 🍭

Thefilter.code loader option (introduced in 2.3.0-beta.0) has been renamed tocodeFilter . If you are upgrading from 2.3.0-beta.0, replacefilter: { code: ... } withcodeFilter: ... in your loader config. No action is needed if you never usedfilter.code .

// 2.3.0-beta.0
{ loader: 'my-loader', filter: { code: 'customMacro(' } }

// 2.3.0-beta.1
{ loader: 'my-loader', codeFilter: 'customMacro(' }

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.3.0-beta.0...v2.3.0-beta.1

2026-10-20 17:26:01
rspack

v2.3.0-beta.0

Highlights

JavaScript parsing with SWC Next

Rspack now uses SWC Next for JavaScript parsing. This beta also includes follow-up compatibility fixes for block-scoped functions, parser source types, and legacy parser behavior. See #16089.

Content-based loader filtering

The new loader filter.code option accepts a string or regular expression and checks the loader's current input before running its normal transform. Loaders can skip files that do not contain the syntax or markers they need to process, avoiding unnecessary transformation work. For example, a loader that transforms customMacro() calls can use filter: { code: 'customMacro(' } to skip inputs without that marker. Pitch functions are unaffected. See #16073.

Better SplitChunks output

Named cache groups now remove redundant module copies from source chunks connected to the same shared chunk, reducing duplicate code in affected builds. Rspack also supports splitChunks.minRemainingSize to avoid splits that leave undersized chunks, bringing JavaScript and extracted CSS output closer to webpack. For example, an affected asynchronous CSS import now retains its expected controls.css filename in production. See #16075 and #15594.

Better watcher compatibility

Native and Node watch file systems now expose watchpack-compatible getTimes(), getTimeInfoEntries(), and collectTimeInfoEntries() APIs. With experiments.nativeWatcher, compiler.fileTimestamps, compiler.contextTimestamps, and the watcher's getInfo() now return real timestamp entries, improving compatibility with plugins that rely on watch metadata, such as ts-loader, webpack-virtual-modules, and vue-loader. The Node watcher also merges time-info entries deterministically so directory timestamps are preserved regardless of dependency iteration order. See the WatchFileSystem API documentation, #15754 and #16126.

Memory improvements and diagnostics

Rspack avoids retaining serialized source maps, reducing memory retained by source objects. Source handling also uses a source-wide UTF-16 index and removes its object pool. See #16072 and #16083.

New allocative-based memory diagnostics help identify which Rust data structures retain memory during builds and HMR updates. See the memory diagnostics guide to capture and analyze snapshots.

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.9...v2.3.0-beta.0

2026-10-13 15:43:47
rspack

v2.2.9

Highlights

Less duplicate code. Smaller bundles. 📦

Rspack's chunking algorithm has been improved to reduce duplicate modules across chunks. (#15885)

https://github.com/user-attachments/assets/0840ec5b-7eea-4d37-9053-cc5cef176103

Smaller package size

Rspack upgrades browserslist-rs and enables deflate compression for its browser data, reducing native binary by 2.13 MB (3.08%). (#16009)

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.8...v2.2.9

2026-09-28 22:33:13
rspack

v2.2.8

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.7...v2.2.8

2026-09-23 08:56:14
rspack

v2.2.7

Highlights

Smaller bundles with improved code splitting

The new optimization.splitChunks.dedupDepth option lets Rspack spend more build time finding shared code and reducing duplication, giving you more control over the balance between bundle size and build time. In one application with many routes, this option reduced total output size by 9.9%.

It defaults to 1 in production and 0 in development. #15497

Build performance improvements

This release reduces repeated work and allocations during chunk graph construction and CSS Modules class name generation. JavaScript loaders also avoid copying their input content on each invocation, further reducing processing overhead.

  • Optimize chunk graph construction: #15278, #15805.
  • Reuse metadata and template values when generating CSS Modules class names: #15783, #15804.
  • Avoid cloning JavaScript loader content: #15817.

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.2.6...v2.2.7