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

v2.2.0-rc.0

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.0-beta.1...v2.2.0-rc.0

5 days ago
rspack

v2.2.0-beta.1

Highlights

RSC: Client Component CSS now uses Flight preinit

Rspack now emits Client Component exports as registered client references directly. CSS imported by a Client Component is no longer injected by wrapping its exports with generated <link> elements; the stylesheet is preinitialized from the React Flight payload instead. This preserves client-reference identity, including default, named, CommonJS, and non-component exports. Explicit link generation remains available through import.meta.rspackRsc.loadCss().

This is a breaking change for RSC framework integrations. Upgrade react-server-dom-rspack to 0.1.0 and update any code that relies on the previous export-wrapper behavior.

SWC 77: Wasm plugins must be rebuilt

swc_core is upgraded from 76 to 77, which changes the serialized AST encoding across the SWC Wasm plugin boundary. Plugins compiled against an earlier SWC schema no longer load and the build fails with The version of the SWC Wasm plugin you're using might not be compatible with 'builtin:swc-loader'. Rebuild your plugin, or upgrade to an SWC 77 compatible release .

Use plugins.swc.rs to find the plugin version matching your Rspack release, and see SWC plugin version mismatch for details. SWC 77 also introduces dedicated FunctionBody and ArrowFunctionBody::FunctionBody AST nodes, a breaking change for Rust-side consumers of the SWC AST.

CSS Modules: standards-aligned Unicode identifiers

CSS identifier escaping and unescaping now follow the CSS Syntax standard, so Unicode identifiers are emitted directly instead of carrying unnecessary backslashes.

.😍 {
  color: red;
}

now generates .style_modules_css-😍 rather than .style_modules_css-\😍.

CSS Modules coverage also expands to more webpack cases — local/global modes, generator options, ICSS @value, custom identifiers, and warning order — and dependency collection moves into css-module-lexer, so stylesheets are no longer rescanned with regular expressions after parsing.

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.1.10...v2.2.0-beta.1

10 days ago
rspack

v2.1.10

[!NOTE] Removed noisy import.meta warnings

Rspack 2.1.9 introduced warnings for unknown import.meta properties. Because they proved overly noisy in real-world builds, Rspack 2.1.10 removes them to reduce unnecessary diagnostics for custom or runtime-specific extensions. See #15166 for detail.

What's Changed

New Features 🎉

Bug Fixes 🐞

Refactor 🔨

Document 📖

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.9...v2.1.10

12 days ago
rspack

v2.1.9

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.1.8...v2.1.9

19 days ago
rspack

v2.1.8

Highlights

Persistent cache storage options now align with webpack

Rspack now supports cache.name and cache.storage.location, aligning with webpack's persistent cache semantics. cache.storage.directory is now the base directory, while the final cache location defaults to <directory>/<cache.name>. Default cache paths remain unchanged.

If you previously used storage.directory as the exact cache path, migrate it to storage.location. Existing cache data is not migrated automatically.

cache: {
  type: 'persistent',
  storage: {
    type: 'filesystem',
-   directory: '/custom/cache',
+   location: '/custom/cache',
  },
}

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.1.7...v2.1.8

25 days ago
rspack

v2.1.7

Notice: The import.meta.env experimental feature introduced in Rspack 2.1.6 has been removed in Rspack 2.1.7.

What's Changed

Performance 🚀

Bug Fixes 🐞

Other Changes

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.6...v2.1.7

26 days ago
rspack

v2.1.6

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.1.5...v2.1.6

2026-07-21 19:03:37
rspack

v2.1.5

What's Changed

Bug Fixes 🐞

Refactor 🔨

Other Changes

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.4...v2.1.5

2026-07-14 21:40:54
rspack

v2.1.4

Highlights

Faster ESM output builds

Building with output.module is now much faster. A lodash-es production build went from 503.8 ms to 161.6 ms (-67.9%).

Fine-grained import.meta parser options

module.parser.javascript.importMeta now accepts an object so each known import.meta property can be configured independently, on top of the existing true / false / 'preserve-unknown' values. Properties set to false are preserved for runtime evaluation, omitted properties keep their default behavior, and unknown properties are preserved. Both webpack-compatible keys (dirname, filename, main, url, webpack, webpackContext) and Rspack-specific keys (rspackHash, rspackPublicPath, glob, ...) are supported.

export default {
  module: {
    parser: {
      javascript: {
        importMeta: {
          // keep `import.meta.url` for runtime evaluation
          url: false,
          // keep the compile-time replacement of `import.meta.webpack`
          webpack: true,
        },
      },
    },
  },
};

Static worker URL output

module.parser.javascript.worker now accepts an object form with alias and url, alongside the existing boolean and string[] forms. With url: 'new-url-relative' and output.module enabled, Rspack emits a static new URL() expression for new Worker(new URL(..., import.meta.url)) instead of runtime code, honoring output.publicPath and output.workerPublicPath.

export default {
  output: {
    module: true,
    chunkFilename: '[name].bundle.js',
  },
  module: {
    parser: {
      javascript: {
        worker: {
          url: 'new-url-relative',
        },
      },
    },
  },
};
new Worker(new URL('./worker.js', import.meta.url));

// would become 👇
new Worker(new URL('./worker.bundle.js', import.meta.url));

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Refactor 🔨

Other Changes

New Contributors

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.3...v2.1.4

2026-07-07 16:08:46
rspack

v2.1.3

What's Changed

New Features 🎉

  • feat: add name/value accessors to ESMExportSpecifierDependency (#14641 by @yashwanth195)
  • feat(core): expose the real Chunk instance to filename functions (#14549 by @JSerFeng)

Performance 🚀

  • perf: erase js tap storage types to reduce binary size (#14636 by @intellild)
  • perf: build rspack source maps directly (#14621 by @intellild)
  • perf: optimize module hash creation (#14654 by @LingyuCoder)
  • perf(mangle_exports): pre-size per-module maps and vecs (#14705 by @stormslowly)

Bug Fixes 🐞

  • fix: update runtime context during hot updates (#14644 by @LingyuCoder)
  • fix(concatenation): inline-value check must precede deferred pure checks (#14663 by @guru-irl)
  • fix(css): skip re-applying unchanged CSS during HMR (#14580 by @stormslowly)
  • fix(asset): preserve asset bytes for binary files (#14670 by @hardfist)
  • fix(css): dedupe link HMR stylesheets (#14666 by @intellild)
  • fix(mf): emit manifest assets with forward-slash names on Windows (#14667 by @johncarmack1984)
  • fix(esm_library): unwrap dynamic source-phase imports in modern-module output (#14673 by @elecmonkey)
  • fix(esm_library): preserve static source-phase external bindings (#14674 by @elecmonkey)
  • fix(bench): pin glibc string-func dispatch to stabilize simulation benches (#14704 by @stormslowly)
  • fix(css): distinguish css wrapper sourcemap names (#14675 by @intellild)
  • fix(binding): keep path data chunk compatible (#14698 by @JSerFeng)

Refactor 🔨

  • refactor: use rspack runtime module prefix (#14630 by @LingyuCoder)
  • refactor: split content hash from std Hash (#14384 by @intellild)
  • refactor: rename hash objects for clearer semantics (#14642 by @intellild)
  • refactor: use rspack scheme for source map defaults (#14635 by @LingyuCoder)
  • refactor(runtime): collect runtime writes from ejs define (#14651 by @LingyuCoder)
  • refactor(napi): remove napi tokio runtime dependency (#14696 by @hardfist)

Other Changes

  • test: register misc bundle benchmark (#14632 by @hardfist)
  • chore(release): stream per-package publish output (#14585 by @stormslowly)
  • chore(deps): update github-actions (#14638 by @renovate[bot])
  • ci: replace rust-cache with sccache (TOS) on self-hosted runners (#14567 by @stormslowly)
  • ci: reset lynx-infra/cache action to d6bd70b (#14646 by @stormslowly)
  • chore(ci): run binary size limit on linux mini runner (#14648 by @stormslowly)
  • chore(ci): compare binary size against PR merge base (#14656 by @stormslowly)
  • test: isolate emit-isolated-dts case to fix cross-suite dts write race (#14659 by @stormslowly)
  • chore(deps): update github-actions (major) (#14639 by @renovate[bot])
  • chore(deps): update dependency @rslint/core to v0.6.4 (#14678 by @renovate[bot])
  • chore(deps): update patch npm dependencies (#14679 by @renovate[bot])
  • chore(deps): update dependency prettier to v3.9.4 (#14680 by @renovate[bot])
  • chore(deps): update rust crate tempfile to 3.27.0 (#14685 by @renovate[bot])
  • chore(deps): update rust crate unicase to 2.9.0 (#14686 by @renovate[bot])
  • chore(deps): update rust crate json-escape-simd to 3.1.0 (#14694 by @renovate[bot])
  • chore(deps): update rust crate derive_more to 2.1.1 (#14692 by @renovate[bot])
  • chore(deps): update rust crate clap to 4.6.1 (#14689 by @renovate[bot])
  • chore(deps): update rust crate bytes to 1.12.0 (#14688 by @renovate[bot])
  • chore(deps): update rust crate dashmap to 6.2.1 (#14691 by @renovate[bot])
  • chore(deps): update rust crate criterion to 4.7.0 (#14690 by @renovate[bot])
  • chore(deps): update napi to 3.10.3 (#14681 by @renovate[bot])
  • chore: bump swc_core from 71 to 72 (#14709 by @CPunisher)
  • chore(deps): bump rspack_resolver to 0.9.4 (#14710 by @stormslowly)

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.2...v2.1.3