Skip to content

Releases: web-infra-dev/rspack

v1.2.6

25 Feb 10:32
Compare
Choose a tag to compare

What's Changed

Performance Improvements ⚑

  • perf(loader-runner): memoize resolver creation for improved performance by @inottn in #9403
  • perf: remove blocking for execute module hook by @ahabhgk in #9406
  • perf: use partition_map to avoid clone by @JSerFeng in #9427

Exciting New Features πŸŽ‰

Bug Fixes 🐞

  • fix(incremental): enable incremental for full hash test by @ahabhgk in #9377
  • fix: sort group by group index by @JSerFeng in #9394
  • fix: sort order incorrect by @JSerFeng in #9404
  • fix: strip blob: protocol when public path is auto by @stormslowly in #9303
  • fix(type): Change the module in the LazyCompilationOptions from any to Module by @gaoachao in #9387
  • fix: clean up deps at the beginning of compilation.finish by @jerrykingxyz in #9414
  • fix(json): correctly escape unicode characters by @inottn in #9419
  • fix: remove dynamic entry should re-build chunk graph by @ahabhgk in #9425
  • fix: build error with reserved keywords in CSS modules by @inottn in #9439
  • fix: update CLI flags to use camelCase consistently by @chenjiahan in #9442
  • fix: use persistent cache with module federation by @jerrykingxyz in #9445

Other Changes

Full Changelog: v1.2.5...v1.2.6

v1.2.5

19 Feb 12:14
Compare
Choose a tag to compare

Note πŸ›

Version 1.2.5 fixes compatibility issues caused by Glibc versions on Linux x86 systems in version 1.2.4.

What's Changed

Exciting New Features πŸŽ‰

  • feat(splitChunks): support splitChunks.minSizeReduction by @JSerFeng in #9341

Bug Fixes 🐞

  • fix: revert linux x86_64 publish to docker by @hardfist in #9373
  • fix: remove unnecessary path-to-URL conversion in html plugin by @inottn in #9348
  • fix(splitChunks): splitChunks maxSize not work as expected if size of some type is small by @JSerFeng in #9285

Document Updates πŸ“–

Other Changes

Full Changelog: v1.2.4...v1.2.5

v1.2.4

19 Feb 08:50
Compare
Choose a tag to compare

Highlights πŸ’‘

Support for SRI

This release introduces a new built-in SubresourceIntegrityPlugin to provide support for Subresource Integrity (SRI).

SubresourceIntegrityPlugin is a Rust rewrite of the webpack-subresource-integrity and is much more faster.

import { experiments } from '@rspack/core';

const { SubresourceIntegrityPlugin } = experiments;

export default {
  plugins: [new SubresourceIntegrityPlugin()],
  output: {
    crossOriginLoading: 'anonymous',
  },
};

Updated Roadmap

The Rspack roadmap has been updated with new targets such as Wasm build and Rstest, see Roadmap.

What's Changed

Performance Improvements ⚑

Exciting New Features πŸŽ‰

Bug Fixes 🐞

Document Updates πŸ“–

Other Changes

Read more

v1.2.3

11 Feb 12:44
Compare
Choose a tag to compare

What's Changed

Performance Improvements ⚑

Exciting New Features πŸŽ‰

  • feat(create-rspack): create React 19 project by default by @chenjiahan in #9130
  • feat: add rust benchmark case for code splitting by @JSerFeng in #9127
  • feat: get block chunk group by @SyMind in #9165
  • feat: support missing module graph js api by @SyMind in #9172
  • feat: support missing module js api by @SyMind in #9177
  • feat: add rsdoctor native plugin by @LingyuCoder in #8930
  • feat: layer option support function by @SyMind in #9189
  • feat: chunkGroup.childrenIterable & dependency.ids by @SyMind in #9195
  • feat: add getResolver method for NormalModuleFactory by @inottn in #9202
  • feat(lazy-compilation): support module id for LazyCompilationProxyModule by @JSerFeng in #9223
  • feat(plugin-css): should handle css layer supports media by @JSerFeng in #9221
  • feat: add native hook of real content hash plugin by @LingyuCoder in #9234

Bug Fixes 🐞

  • fix: dll manifest zod validation by @ahabhgk in #9112
  • fix: amd require array by @ahabhgk in #9113
  • fix: require local module and support new require by @ahabhgk in #9114
  • fix: amd alias define renaming by @ahabhgk in #9117
  • fix: correct lazy compilation backend options schema by @chenjiahan in #9138
  • fix: should not tree shaking used ident accidentally in composes by @JSerFeng in #9161
  • fix(types): prebundle @swc/types to fix missing dts files by @inottn in #9173
  • fix: do not expose build() for level-2 options builder by @h-a-n-a in #9188
  • fix: align default options with JS by @h-a-n-a in #9116
  • fix(core): initialize resolverFactory early by @hardfist in #9193
  • fix(core): don't swallowing exceptions in stats.toJson by @hardfist in #9208
  • fix: incremental make rebuild removed entry module by @jerrykingxyz in #9209
  • fix: ignore generator options for asset/source module type by @haocheng6 in #9216
  • fix: lazy compilation request handler should filter lazy-compilation request by @JSerFeng in #9166
  • fix: alias sequence order & merge result by @SyMind in #9206
  • fix(incremental): build chunk graph not build new added entry by @ahabhgk in #9225
  • fix: namedChunks / emitAsset js api by @SyMind in #9185
  • fix: rspack sources perf bug by @SyMind in #9229
  • fix(deps): ⬆️ rspack_resolver 0.5.1 by @stormslowly in #9233

Document Updates πŸ“–

Other Changes

Read more

v1.2.2

23 Jan 13:38
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

  • feat: add runtime plugin hooks by @LingyuCoder in #9084
  • feat(incremental): don't use has_module_import_export_change when incremental code splitting enabled by @ahabhgk in #9062
  • perf(options): replace Regexp with ends_with match by @h-a-n-a in #9081

Bug Fixes 🐞

  • revert: fix: align amd option behavior with webpack by @ahabhgk in #9103
  • fix: resolve the inconsistent type issue in JsModule by @shulaoda in #8939
  • fix: should not have warnings for cjs when using dll by @ahabhgk in #9091
  • fix: should not cache tracing instance by @h-a-n-a in #9086
  • fix: render module id as number if we can by @ahabhgk in #9099

Other Changes

  • test(benchmark): add basic sourcemap bench case by @h-a-n-a in #9100

Full Changelog: v1.2.1...v1.2.2

v1.2.1

22 Jan 14:03
Compare
Choose a tag to compare

What's Changed

New Features πŸŽ‰

  • feat: improve compatibility with compiler options by @h-a-n-a in #9067
  • feat: integrate rspack_dojang for enhanced template rendering by @GiveMe-A-Name in #9079

Bug Fixes 🐞

  • fix: amd define in function params by @ahabhgk in #9088
  • revert: rspack sources substring heuristic algorithm by @SyMind in #9082

Other Changes

Full Changelog: v1.2.0...v1.2.1

v1.2.0

21 Jan 11:34
Compare
Choose a tag to compare

See Announcing Rspack 1.2 for more details.

What's Changed

Performance Improvements ⚑

Exciting New Features πŸŽ‰

Bug Fixes 🐞

  • fix: external module move out initial chunk by @SyMind in #8644
  • fix: escape css by @JSerFeng in #8698
  • fix: the wrong filename was passed when calling the assetEmitted hook by @inottn in #8709
  • fix: module concatenation for dynamic export info by @ahabhgk in #8730
  • fix: duplicate move lock files by @LingyuCoder in #8732
  • fix: fix nightly release compare-before-emit-disable test failed by @jerrykingxyz in #8739
  • fix: mf parse range not compat with safari by @ahabhgk in #8749
  • fix: incremental rebuild are compatible with empty artifact by @jerrykingxyz in #8758
  • fix: correct type for loaderContext.importModule by @chenjiahan in #8766
  • fix: allow empty persistent cache options by @h-a-n-a in #8813
  • fix: use cgm hash to verify rename inline modules cache by @ahabhgk in #8820
  • fix: Rspack cssParser will parse failed when url(' ') by @cbbfcd in #8824
  • fix(diagnostic): improve diagnostics for swc wasm plugins when mismatch by @SyMind in #8001
  • fix!: handle glob patterns ending with /** in CopyRspackPlugin by @inottn in #8803
  • fix(exernals): add hash to distinguish conflict id by @fi3ework in #8834
  • fix: importModule should recei...
Read more

v1.2.0-beta.0

07 Jan 10:20
Compare
Choose a tag to compare

What's Changed

Exciting New Features πŸŽ‰

  • feat: support set build info in js side by @SyMind in #8893
  • feat: support invalidate persistent cache using config.mode and config.name by @jerrykingxyz in #8920
  • feat: support devtool to compiler options builder by @h-a-n-a in #8940
  • feat(plugin-css-extract): add enforceRelative plugin option to preserve './' by @SoonIter in #8946

Bug Fixes 🐞

Document Updates πŸ“–

Other Changes

New Contributors

Full Changelog: v1.2.0-alpha.0...v1.2.0-beta.0

v1.2.0-alpha.0

30 Dec 10:49
Compare
Choose a tag to compare

Highlights πŸ’‘

Support for persistent cache

Rspack v1.2 introduced an experimental cache configuration that supports persistent caching, which can significantly improve hot startup speed.

When a build hits the cache, it can bring up to 60% performance improvement in real projects.

// rspack.config.js
module.exports = {
  cache: true,
  experiments: {
    cache: {
      type: 'persistent',
    },
  },
};

Note that the persistent cache is still in an early experimental stage and there is a lot of room for performance improvement.

No longer watching node_modules

Rspack v1.2 no longer watching the node_modules directory by default. This can greatly reduce the number of files to watch and improve performance.

According to our benchmark repo, this change will:

  • Reduce memory usage by 120MB.
  • Increase dev startup speed by 40%.
  • Increase HMR speed by 20~30%.

This change will not affect symlinked resources in monorepo, as symlinked resources are resolved to their real path by default.

Related PR: perf: ignore watching files in node_modules by @chenjiahan in #8645

Upgrade to SWC 9.0

The Rust crate swc_core has been upgraded to 9.0.2. Users of the SWC Wasm plugin need to ensure version consistency with the swc_core being used, otherwise, it may lead to unforeseen issues.

For more details, see SWC Plugin Version Unmatched.

Related PR: feat(core)!: bump swc_core to 9.0.0 by @andersk in #8639

Reduced memory usage

We have optimized the data structure used to store strings during the rspack-sources computation process. Throughout the computation, all string data points to the string heap memory of the root node, effectively avoiding the generation of new string allocations during the computation.

Related PR: perf: reduce memory consumption of CachedSource by @h-a-n-a in #8666

Reduced bundle size

Rspack v1.2.0 set default SWC minimizer passes to 2 to reduce bundle size by 1%-7%.

passes is the the maximum number of times to run compress. In some cases, more than one pass leads to further compressed code. Given Rspack's inherent speed, we've determined that using 2 passes by default strikes an optimal balance between build performance and bundle size.

Related PR: feat: set default SWC minimizer passes to 2 to reduce bundle size by @chenjiahan in #8853

Parallelize side effects optimization

The implementation of side effects optimization has been refactored to be simpler and more parallelism-friendly. It can take full advantage of parallelism to improve performance. In tested projects, there is typically a 2x-3x performance improvement at this stage.

Related PR: perf: parallelize side effects optimization by @ahabhgk in #8781

Disable WarnCaseSensitiveModulesPlugin by default

The WarnCaseSensitiveModulesPlugin will check the paths of modules and issue warnings for modules that conflict when their paths are all in lowercase. We used to enable it by default, but since it is only a "linter" plugin and it has additional performance overhead especially in development mode. So now we disable it by default, and recommend to use WarnCaseSensitiveModulesPlugin to add it to your own needs.

// rspack.config.js
module.exports = {
  plugins: [new rspack.WarnCaseSensitiveModulesPlugin()],
};

Related PR: feat: export WarnCaseSensitiveModulesPlugin and disable it by default by @ahabhgk in #8697

What's Changed

Performance Improvements ⚑

  • perf: remove tokio-console to reduce binary size by @chenjiahan in #8681
  • perf: bump miette v7 to reduce binary size by @chenjiahan in #8694
  • perf(incremental): compute affected cgm incrementally by @ahabhgk in #8688
  • perf: reduce memory consumption of CachedSource by @h-a-n-a in #8666
  • perf: faster substring of rspack-sources by @h-a-n-a in #8731
  • perf: side effects when there aren't too many optimizable dependencies by @ahabhgk in #8746
  • perf: parallelize side effects optimization by @ahabhgk in #8781
  • perf(deps): bump fast-glob to v0.4.1 by @shulaoda in #8800
  • perf: improve FlagDependencyExportsPlugin for large JSON by depth by @hai-x in #8802
  • perf(incremental): better parallel for side effects plugin rebuild by @ahabhgk in #8848
  • perf(cli): remove Node.js semver checker by @chenjiahan in #8855
  • perf(cli): lazy import rechoir and interpret by @chenjiahan in #8856

Exciting New Features πŸŽ‰

Bug Fixes 🐞

Read more

v1.1.8

19 Dec 08:23
Compare
Choose a tag to compare

Security Vulnerability Report

Overview

This is a re-release version of v1.1.6

On 12/19/2024, 02:01 (UTC), we discovered that our npm packages @rspack/core and @rspack/cli were maliciously attacked. The attacker released v1.1.7 using a compromised npm token, which contained malicious code. We took immediate action upon discovering the issue.

Impact

  • Affected versions: @rspack/core and @rspack/cli v1.1.7
  • Duration: 12/19/2024, 02:01 (UTC), lasting approximately 1 hour
  • Malicious code impact: After npm install, the postinstall script in package.json runs malicious code in dist/util/support.js. See Malicious code analysis for more details.

Actions Taken

Upon discovery, we immediately deprecated the affected v1.1.7, redirected the npm latest tag to v1.1.6, and reset all related tokens.
Subsequently, we released a secure new version v1.1.8.

Recommended Actions

If you installed v1.1.7 during the affected period, please:

  1. Update to the latest safe version immediately: @rspack/core and @rspack/cli to >= 1.1.8
  2. Check your system for any unusual activity

Apology and Commitment

We deeply apologize for the risks caused by this incident. To prevent similar incidents from happening again, we will implement stricter token management protocols and enhance our security review processes.

If you have any questions or discover any suspicious activity, please create an issue or send an email to: [email protected]

We will continue to follow and respond to community feedback.