Skip to content

Releases

v2.3.3

Choose a tag to compare

@stormslowly stormslowly released this 17 Nov 09:26
47aae98

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 🍭

  • fix!: align HTTP module lockfiles with webpack by @SyMind in #16656

New Features 🎉

  • feat(ids): support salt for deterministic chunk and compact-hashed ids by @LingyuCoder in #16537
  • feat(tree-shaking): narrow destructured dynamic import namespaces by @JSerFeng in #16574
  • feat(externals): support interop hints for object externals by @JSerFeng in #16529

Performance 🚀

Bug Fixes 🐞

  • fix: isolate module build cache sessions by graph by @ahabhgk in #16540
  • fix(resolver): respect tsconfig extends array precedence by @stormslowly in #16554
  • fix(split-chunks): prune source types below minSizeReduction by @JSerFeng in #16573
  • fix: preserve Rule.as path delimiters and portable resources by @intellild in #16551
  • fix: initialize build-time runtime globals in both runtime modes by @LingyuCoder in #16577
  • fix(cache): serialize shared consumption dependencies by @ahabhgk in #16561
  • fix(cache): filter source map assets before lookup by @ahabhgk in #16562
  • fix(cache): normalize context resource dependency paths by @ahabhgk in #16563
  • fix(cache): reuse restored remote modules by @ahabhgk in #16565
  • fix(lazy-compilation): reject imports after HMR failure by @ScriptedAlchemy in #15947
  • fix(ci): preserve clang during Linux disk cleanup by @LingyuCoder in #16588
  • fix: mark modules with a top-level await using as async by @hai-x in #16442
  • fix(split-chunks): keep named groups that narrowing would remove by @guru-irl in #16487
  • fix: handle HTTP module response stream errors by @JSerFeng in #16233
  • fix(sri): carry lazy hashes in the chunk that makes the import() call by @sd2k in #16420
  • fix(css-extract): find stylesheets whose filename has a query by @ebidel in #16346
  • fix(cache): track DefinePlugin definition keys by @ahabhgk in #16589
  • fix(tree-shaking): avoid receivers for destructured dynamic import calls by @JSerFeng in #16593
  • fix: preserve target major versions above 255 by @chenjiahan in #16601
  • fix(cache): reuse loader output after a caught import cycle by @ahabhgk in #16583
  • fix(cache): snapshot invalid Windows missing paths by @ahabhgk in #16584
  • fix(cache): share loader cache across modes and SSR compilers by @intellild in #16558
  • fix: finalize finishMake module rebuilds and artifacts by @LingyuCoder in #16580
  • fix: resolve import() of self-accepting modules to their latest evaluation by @hai-x in #16595
  • fix(cache): cache module-not-found resolution results by @ahabhgk in #16560
  • fix(javascript): preserve outer ASI boundaries across nested statements by @LingyuCoder in #16613
  • fix: annotate pure module initializers in ESM output by @JSerFeng in #16605
  • fix(cache): keep lazy barrel state per compilation by @ahabhgk in #16609
  • fix: cache extracted CSS modules with fresh input validation by @ahabhgk in #16618
  • fix: count reused metadata for empty child compilers by @ahabhgk in #16620
  • fix(cache): include loader configuration and versions in etags by @intellild in #16591
  • fix(tree-shaking): resolve CommonJS default re-export to module.exports by @hai-x in #16639
  • fix(binding): preserve normal module createData context by @SyMind in #16657
  • fix(javascript): keep shorthand property keys when replacing identifiers by @hai-x in #16627
  • fix(css): respect devtool for embedded source maps by @intellild in #16655
  • fix(css): omit unused JavaScript modules for CSS URL assets by @intellild in #16654
  • fix(swc-loader): migrate box patterns to deref patterns by @intellild in #16667
  • fix(cache): invalidate newCache when configured build dependencies change by @ahabhgk in #16660
  • fix(core): preserve factorization metadata for reused entries by @SyMind in #16668
  • fix(resolver): make preferAbsolute try the absolute path first by @cezaraugusto in #16617
  • fix(core): clean up loader error stacks by @chenjiahan in #16641

Refactor 🔨

  • refactor(hmr): use the chunk content hash as its hmr version by @hai-x in #16585
  • refactor(core): simplify property checks and iteration by @chenjiahan in #16644

Document 📖

Read more

v2.3.2

Choose a tag to compare

@JSerFeng JSerFeng released this 10 Nov 11:47

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. #16472

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 🎉

  • feat(sri): support hashLoading: "lazy" in SubresourceIntegrityPlugin by @sd2k in #16374
  • feat: add output.environment.topLevelAwait and await async ESM entries by @hai-x in #16386
  • feat: support externals.byLayer by @stormslowly in #16307
  • feat(css): Add opt-in runtime public paths for injected styles by @scttcper in #15705
  • feat: add experimental rule.as by @intellild in #15917
  • feat(tree-shaking): prune dynamic imports from unused exports by @LingyuCoder in #15449
  • feat: skip side-effect-free export * passthrough modules by @hai-x in #16472

Performance 🚀

Bug Fixes 🐞

  • fix(core): keep property access when inlining an export reached through a re-export by @flex-mookeun in #16310
  • fix(core): keep the full hash stable across rebuilds without HMR by @guru-irl in #16280
  • fix(runtime): avoid coercion collisions in chunk ID matchers by @intellild in #16423
  • fix(devtool): map bootstrap and startup sources by @LingyuCoder in #16426
  • fix: keep receiver exports for calls on unprovided members by @hai-x in #16418
  • fix: restore side-effect imports after package metadata changes by @ahabhgk in #16435
  • fix(cache): reuse completed builds for external and generated modules by @ahabhgk in #16429
  • fix(core): fold chunk hashes into the full hash in chunk id order by @guru-irl in #16293
  • fix: keep initializers of unused top-level using declarations by @hai-x in #16437
  • fix(watcher): preserve concrete paths in native watcher events by @stormslowly in #16411
  • fix(stats): report each runtime module's own size and chunks by @guru-irl in #16076
  • fix(hmr): complete new entry chunk dependencies by @JSerFeng in #15955
  • fix: isolate entry declarations from runtime tables by @ahabhgk in #16497
  • fix: preserve module namespace key order for mixed exports by @LingyuCoder in #16491
  • fix(watcher): separate filesystem accuracy from cache by @stormslowly in #16512
  • fix(watcher): align rename events with watchpack by @stormslowly in #16460
  • fix: skip cyclic star re-exports when resolving a binding by @LingyuCoder in #16496
  • fix: preserve lone surrogates during constant evaluation by @LingyuCoder in #16494
  • fix(watcher): pass SystemTime to mtime_accuracy by @hai-x in #16526
  • fix(resolver): support UTF-8 BOM in tsconfig files by @stormslowly in #16518
  • fix: evaluate x in ns to true when x is a re-exported namespace by @hai-x in #16509
  • fix: preserve negative zero in exports and use JavaScript number strings in constant evaluation by @LingyuCoder in #16527
  • fix(mf): keep the whole requiredVersion range in mf-manifest.json by @arnaud-zg in #16402
  • fix(core): distinguish fatal module errors from loader diagnostics by @ahabhgk in #16538
  • fix(css): scope counter styles and implicit grid lines by @intellild in #16520
  • fix(hmr): invalidate cached chunks when version tags change by @JSerFeng in #16548
  • fix(watcher): account for directory mtime accuracy by @stormslowly in #16531
  • fix(mf): read provided shared fields directly in manifests by @ahabhgk in #16533
  • fix(resolver): report circular tsconfig extends instead of crashing by @stormslowly in #16513
  • fix(hmr): load async groups through their last chunk by @JSerFeng in #16328
  • fix(resolver): reload PnP manifest from cached path by @stormslowly in #16543

Refactor 🔨

  • refactor(binding): rely on napi-rs for module retention by @SyMind in #16431
  • refactor: remove unused exports_definitions hook from ConcatenatedModule by @hai-x in #16434
  • refactor(binding): implement module classes in JavaScript by @SyMind in #16436

Document 📖

Read more

v2.3.1

Choose a tag to compare

@ahabhgk ahabhgk released this 03 Nov 11:12

What's Changed

New Features 🎉

  • feat(runtime): support incremental runtime module updates by @JSerFeng in #16326

Performance 🚀

Bug Fixes 🐞

  • fix: compare named cache groups by the size they actually save by @hai-x in #16291
  • fix: don't use the line number as the column of a JS error loc by @hai-x in #16324
  • fix(css): skip stylesheets of entries not on the page on hot update by @CyberAP in #16215
  • fix(watcher): wait for aggregateTimeout after the last change by @guru-irl in #16304
  • fix: avoid using absolute paths in sourcemap hashes by @cellison-figma in #16313
  • fix(binding): preserve worker callback ownership and native module lifetime by @SyMind in #16318
  • fix: cache rendered diagnostics across rebuilds by @JSerFeng in #16358
  • fix(javascript): keep exports referenced through arguments in import().then callback by @ump45nose in #16392
  • fix(css): include shared initial chunks in filename runtime by @intellild in #16355
  • fix(css): gate the stylesheet link runtime by chunk loading by @intellild in #16340
  • fix(sources): preserve missing source contents as null by @SyMind in #16366
  • fix(lightningcss-loader): preserve parser flags during stylesheet conversion by @mattcosta7 in #16378
  • fix(sources): don't let a generated-only mapping shadow a mapped one at the same column by @flex-mookeun in #16363
  • fix(allocative): update root macro for ctor 0.13 by @hai-x in #16385
  • fix(hmr): validate chunk versions before installation by @JSerFeng in #16360
  • fix(mf): use correct async startup handlers in rspack runtime by @hai-x in #16399

Refactor 🔨

  • refactor(javascript): migrate to semantic symbol links by @CPunisher in #16335
  • refactor(concatenate): drop repeated lookups and dead binding fields by @hai-x in #16219

Document 📖

Other Changes

New Contributors

Full Changelog: v2.3.0...v2.3.1

v2.3.0

Choose a tag to compare

@intellild intellild released this 29 Oct 08:12

What's Changed

🎉 See Announcing Rspack 2.3 for more details.

New Features 🎉

Performance 🚀

  • perf(size): box hot async entry futures to shrink binding size by @stormslowly in #16085
  • perf(sources): avoid retaining serialized source maps by @LingyuCoder in #16072
  • perf(loader): schedule loader chains as execution units by @intellild in #15401
  • perf(loader-runner): read process.env.WASM once by @guru-irl in #16127
  • perf: avoid creating untouched loader buildInfo by @guru-irl in #16077
  • perf(resolver): prefer package directories in node_modules by @stormslowly in #16154
  • perf(watch): lazily convert native watcher time info by @stormslowly in #16187
  • perf(watcher): reuse directory analysis for unchanged subscriptions by @stormslowly in #16180
  • perf(core): emit ESM export value descriptors when safe by @patrickkunka in #15936
  • perf: reuse residual SplitChunks candidates in place by @JSerFeng in #16081
  • perf(core): scan inline named exports linearly by @kdy1 in #16224
  • perf(core): skip substring search when path has no fragment marker by @kdy1 in #16223
  • perf(split-chunks): match built-in cache group conditions once per compilation by @guru-irl in #16129
  • perf(sources): use slice iteration when parsing string arrays by @kdy1 in #16283
  • perf(sources): read source map fields from the JSON tape by @kdy1 in #16297
  • perf: avoid VLQ accumulation for single-sextet mapping values by @kdy1 in #16298
  • perf(binding): preserve native source graphs during asset updates by @LingyuCoder in #16207

Bug Fixes 🐞

  • fix: skip build dependency collection after fatal compilation errors by @ahabhgk in #16074
  • fix(resolver): resolve tsconfig extends through the real path by @orgads in #15718
  • fix(split-chunks): deduplicate remaining copies in named groups by @JSerFeng in #16075
  • fix(css): align CSS Modules behavior with webpack css-loader fixtures by @intellild in #15816
  • fix(tracing): convert JavaScript trace nanoseconds to microseconds by @LingyuCoder in #16103
  • fix: stabilize module rendering order across platforms by @hai-x in #16100
  • fix(binding): avoid shared property leak warnings on process exit by @SoonIter in #16117
  • fix: use the module exports argument for the AMD exports dependency by @LingyuCoder in #16122
  • fix: respect module arguments in AMD code generation by @hai-x in #16148
  • fix(mf): make deterministic IDs independent of project paths by @LingyuCoder in #16152
  • fix(watch): make node watch time info entries deterministic by @LingyuCoder in #16126
  • fix(javascript): reuse parser source type by @CPunisher in #16102
  • fix: link import bindings inside define callbacks by @hai-x in #16159
  • fix(javascript): respect block function scope by @CPunisher in #16162
  • fix(css): localize type-first nested selectors by @intellild in #16011
  • fix(javascript): preserve legacy parser behavior by @CPunisher in #16164
  • fix(lazy-compilation): avoid barrel reloads on activation by @JSerFeng in #16026
  • fix(split-chunks): support minRemainingSize by @JSerFeng in #15594
  • fix: release updated allocative crates to resolve napi feature mismatch by @intellild in #16171
  • fix(HMR): correct hot updated chunk path resolution in Node.js HMR by @hai-x in #16174
  • fix(release): synchronize workspace versions and CLI peer dependencies by @intellild in #16181
  • fix: inherit splitChunks request limits in cache groups by @hai-x in #16191
  • fix(css): calculate CSS module hashes from graph dependencies by @intellild in #16120
  • fix(core): preserve shorthand assignment keys in concatenation by @dajiaohuang in #16205
  • fix(cache): unify snapshot path matching and package lookup by @ahabhgk in #16194
  • fix(javascript): correct loose equality evaluation for nullish values by @NaamuKim in #16141
  • fix(lazy-compilation): avoid reposting active ids on dispose by @dajiaohuang in #16200
  • fix: allocative crate package names by @intellild in #16212
  • fix(mf): support consumes runtime without chunk loading by @LingyuCoder in #16209
  • fix(mf): normalize single-item container share scopes by @chenjiahan in #16251
  • fix(css): localize animation names before !important by @dajiaohuang in #16204
  • fix(watcher): keep watching when unwatching a stale path fails by @sarankumar1325 in #16199
  • fix(sri): generate integrity hashes for chunks that only contain extracted css by @ojj1123 in #15711
  • fix: inherit sideEffects through nested package metadata by @JSerFeng in #15336
  • fix(types): narrow EvalSourceMapDevToolPlugin options by @chenjiahan in #16265
  • fix(css): keep media attribute of hot replaced stylesheets by @CyberAP in #16214
  • fix(rsc): collect client components from all entry dependencies by @sarankumar1325 in #16254
  • fix(watcher): invalidate on native watcher removals by @guru-irl in #16284
  • fix(watcher): report a removed file once when it stays a dependency by @guru-irl in #16305
  • fix: raise inherited SWC target cap to ES2024 by @chenjiahan in #16314
  • fix(css): preserve stylesheet attributes and state during HMR by @chenjiahan in #16287
  • fix: update named chunks when merging or removing chunks by @hai-x in #16312
  • fix(watcher): preserve native event delivery while JavaScript is blocked by @ScriptedAlchemy in #16106
  • fix: include module_id in chunk hashing by @hai-x in #16168
  • fix(ci): update Dylint to 6.3.0 by @intellild in #16332

Refactor 🔨

  • refactor(binding): retain DependencyRef in JavaScript wrappers by @SyMind in #16061
  • refactor(sources): use a source-wide UTF-16 index and remove object pool by @SyMind in #16083
  • refactor(javascript): remove redundant ESTree AST wrappers by @CPunisher in #16098
  • refactor: reuse current module in dependency templates by @hai-x in ...
Read more

v2.3.0-rc.0

v2.3.0-rc.0 Pre-release
Pre-release

Choose a tag to compare

@intellild intellild released this 27 Oct 07:25

What's Changed

Performance 🚀

  • perf(watch): lazily convert native watcher time info by @stormslowly in #16187
  • perf(watcher): reuse directory analysis for unchanged subscriptions by @stormslowly in #16180
  • perf(core): emit ESM export value descriptors when safe by @patrickkunka in #15936
  • perf: reuse residual SplitChunks candidates in place by @JSerFeng in #16081
  • perf(core): scan inline named exports linearly by @kdy1 in #16224
  • perf(core): skip substring search when path has no fragment marker by @kdy1 in #16223
  • perf(split-chunks): match built-in cache group conditions once per compilation by @guru-irl in #16129

Bug Fixes 🐞

  • fix(core): preserve shorthand assignment keys in concatenation by @dajiaohuang in #16205
  • fix(cache): unify snapshot path matching and package lookup by @ahabhgk in #16194
  • fix(javascript): correct loose equality evaluation for nullish values by @NaamuKim in #16141
  • fix(lazy-compilation): avoid reposting active ids on dispose by @dajiaohuang in #16200
  • fix: allocative crate package names by @intellild in #16212
  • fix(mf): support consumes runtime without chunk loading by @LingyuCoder in #16209
  • fix(mf): normalize single-item container share scopes by @chenjiahan in #16251
  • fix(css): localize animation names before !important by @dajiaohuang in #16204
  • fix(watcher): keep watching when unwatching a stale path fails by @sarankumar1325 in #16199
  • fix(sri): generate integrity hashes for chunks that only contain extracted css by @ojj1123 in #15711

Refactor 🔨

  • refactor: remove unused __rspack_esm_id export from module chunks by @hai-x in #16193
  • refactor(binding): use registered symbols across Rust and JS by @SyMind in #16210

Document 📖

Other Changes

  • chore(deps): update dependency @ast-grep/napi to ^0.51.0 by @renovate[bot] in #16227
  • chore(deps): update rust crate either to 1.19.0 by @renovate[bot] in #16234
  • chore(deps): update dependency cspell to ^10.4.0 by @renovate[bot] in #16229
  • chore(deps): update dependency core-js to v3.51.0 by @renovate[bot] in #16228
  • chore(deps): update rust crate wasmtime to v36.0.19 [security] by @renovate[bot] in #16238
  • chore(deps): update rust crate hashlink to 0.12.2 by @renovate[bot] in #16235
  • chore(deps): update patch npm dependencies by @renovate[bot] in #16226
  • chore(deps): update rust crate ctor to 0.13.1 by @renovate[bot] in #16232

New Contributors

Full Changelog: v2.3.0-beta.1...v2.3.0-rc.0

v2.3.0-beta.1

v2.3.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@intellild intellild released this 22 Oct 09:24

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(' }
  • fix!: rename loader filter.code to codeFilter by @SyMind in #16184

New Features 🎉

Performance 🚀

Bug Fixes 🐞

  • fix: release updated allocative crates to resolve napi feature mismatch by @intellild in #16171
  • fix(HMR): correct hot updated chunk path resolution in Node.js HMR by @hai-x in #16174
  • fix(release): synchronize workspace versions and CLI peer dependencies by @intellild in #16181
  • fix: inherit splitChunks request limits in cache groups by @hai-x in #16191
  • fix(css): calculate CSS module hashes from graph dependencies by @intellild in #16120

Refactor 🔨

Document 📖

Other Changes

Full Changelog: v2.3.0-beta.0...v2.3.0-beta.1

v2.3.0-beta.0

v2.3.0-beta.0 Pre-release
Pre-release

Choose a tag to compare

@intellild intellild released this 21 Oct 02:43

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 🐞

  • fix: skip build dependency collection after fatal compilation errors by @ahabhgk in #16074
  • fix(resolver): resolve tsconfig extends through the real path by @orgads in #15718
  • fix(split-chunks): deduplicate remaining copies in named groups by @JSerFeng in #16075
  • fix(css): align CSS Modules behavior with webpack css-loader fixtures by @intellild in #15816
  • fix(tracing): convert JavaScript trace nanoseconds to microseconds by @LingyuCoder in #16103
  • fix: stabilize module rendering order across platforms by @hai-x in #16100
  • fix(binding): avoid shared property leak warnings on process exit by @SoonIter in #16117
  • fix: use the module exports argument for the AMD exports dependency by @LingyuCoder in #16122
  • fix: respect module arguments in AMD code generation by @hai-x in #16148
  • fix(mf): make deterministic IDs independent of project paths by @LingyuCoder in #16152
  • fix(watch): make node watch time info entries deterministic by @LingyuCoder in #16126
  • fix(javascript): reuse parser source type by @CPunisher in #16102
  • fix: link import bindings inside define callbacks by @hai-x in #16159
  • fix(javascript): respect block function scope by @CPunisher in #16162
  • fix(css): localize type-first nested selectors by @intellild in #16011
  • fix(javascript): preserve legacy parser behavior by @CPunisher in #16164
  • fix(lazy-compilation): avoid barrel reloads on activation by @JSerFeng in #16026
  • fix(split-chunks): support minRemainingSize by @JSerFeng in #15594

Refactor 🔨

  • refactor(binding): retain DependencyRef in JavaScript wrappers by @SyMind in #16061
  • refactor(sources): use a source-wide UTF-16 index and remove object pool by @SyMind in #16083
  • refactor(javascript): remove redundant ESTree AST wrappers by @CPunisher in #16098
  • refactor: reuse current module in dependency templates by @hai-x in #16149
  • refactor(javascript): emit mangled destructuring keys as strings by @CPunisher in #16147
  • refactor(cache): reuse persistent cache options for newCache by @ahabhgk in #16160

Document 📖

Other Changes

Read more

v2.2.9

Choose a tag to compare

@intellild intellild released this 13 Oct 08:50

Highlights

Less duplicate code. Smaller bundles. 📦

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

rspack-chunking.mp4

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 🎉

  • feat: propagate available module growth during code splitting by @JSerFeng in #15885

Performance 🚀

  • perf(binding): query compilation modules lazily by @SyMind in #15906
  • perf: avoid transferring unused NormalModuleFactory dependencies by @ahabhgk in #15931
  • perf(sources): compact retained source storage by @SyMind in #15944
  • perf(stats): cache item type strings in StatsFactory by @stormslowly in #15779
  • perf: use a hash set to deduplicate extracted comments by @CoderSerio in #15967
  • perf(watcher): avoid per-node concurrent sets in the root analyzer by @guru-irl in #15965
  • perf: share Module and KnownBuildInfo accessors by @LingyuCoder in #15883
  • perf: optimize placeholder and Node external matching by @intellild in #15808
  • perf(sources): profile allocations and trim source map capacity by @SyMind in #16014
  • perf(sources): release generated value after static source map by @SyMind in #16022
  • perf(core): cache assetEmitted source and content per info object by @guru-irl in #15963
  • perf(binding): share NormalModule accessors by @LingyuCoder in #16039
  • perf: share equal factorize path lists by content by @LingyuCoder in #16036
  • perf(split-chunks): reuse function chunks filter results per chunk set by @guru-irl in #15964
  • perf(binding): materialize module source maps lazily by @LingyuCoder in #15882
  • perf: share compilation log entry accessors by @LingyuCoder in #16052
  • perf(cache): restore cached modules off the make main task by @guru-irl in #16050
  • perf(core): share file counter dependency lists by interned content by @LingyuCoder in #16043

Bug Fixes 🐞

  • fix(types): allow void returns in needAdditionalPass hooks by @chenjiahan in #15908
  • fix(types): accept falsy loaders and child compiler plugins by @chenjiahan in #15912
  • fix(types): allow single loader returns from rule use functions by @chenjiahan in #15920
  • fix: preserve interned path sharing in cache serialize by @ahabhgk in #15910
  • fix(types): correct Compilation.getAsset return type by @chenjiahan in #15932
  • fix(binding): scope importModule publicPath callbacks to compiler by @chenjiahan in #15928
  • fix(binding): release transient TSFN callbacks by @SyMind in #15938
  • fix(types): allow omitting child compiler plugins by @chenjiahan in #15948
  • fix(css): load async stylesheets with a shared runtime by @intellild in #15869
  • fix(deps): upgrade lightningcss to 1.0.0-alpha.72 by @chenjiahan in #15991
  • fix: propagate async status through lazy barrel re-exports by @dmchoi77 in #15905
  • fix(copy): register a missing glob base dir as a missing dependency by @BleedingDev in #15901
  • fix(css): end unterminated url() at EOF as a url token by @IShinji in #15911
  • fix: preserve statement boundaries in modern-module output by @LingyuCoder in #16008
  • fix(ids): rehash identical keys in compact-hashed ids by @n0th1ng-else in #15915
  • fix(deps): upgrade swc_core to 82.0.0 by @LingyuCoder in #16009
  • fix: resolve aliases in import.meta.glob patterns by @aryan1306 in #15898
  • fix: only source map JS and CSS assets from devtool, matching webpack by @Paca-Vaca in #16018
  • fix: support deferred imports introduced by hot updates by @LingyuCoder in #16015
  • fix: concatenate empty CommonJS modules without export access by @JSerFeng in #15913
  • fix(core): ignore source map directives in JavaScript strings by @Tiancheng-Xu in #15969
  • fix(css-extract): preserve relative paths from publicPath callbacks by @chenjiahan in #15923
  • fix(lazy-compilation): keep import attributes and phase when building activated modules by @stormslowly in #16023
  • fix(lazy-compilation): keep activated modules across rebuilds by @stormslowly in #15134
  • fix(lazy-compilation): keep issuer and resolve options when building activated modules by @stormslowly in #16024
  • fix(watcher): report watched files inside directories that appear by @guru-irl in #15966
  • fix(mf): honor singleton options for shared prefixes in manifests by @LingyuCoder in #16012
  • fix(watcher): report recreated files by their final state by @guru-irl in #16040
  • fix: preserve pure exports during module concatenation by @LingyuCoder in #16053
  • fix(resolver): keep RegExp restrictions in ResolverFactory cache key by @stormslowly in #16054

Document 📖

Read more

v2.2.8

Choose a tag to compare

@JSerFeng JSerFeng released this 28 Sep 14:55

What's Changed

New Features 🎉

  • feat: support JavaScript URL entries with factory type probes by @intellild in #15666
  • feat: resolver cache in the new cache system by @ahabhgk in #15839

Performance 🚀

Bug Fixes 🐞

Document 📖

  • docs: clarify externals usage and consolidate function reference by @chenjiahan in #15866

Other Changes

New Contributors

Full Changelog: v2.2.7...v2.2.8

v2.2.7

Choose a tag to compare

@chenjiahan chenjiahan released this 23 Sep 02:17

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 🐞

  • fix: keep shadowing exports bindings in nested runtime deconfliction by @LingyuCoder in #15742
  • fix(binding): release loader TSFNs on compiler close by @SyMind in #15735
  • fix: render CommonJS externals directly in modern-module output by @JSerFeng in #15238
  • fix: skip entry modules without JavaScript in the chunk startup by @cezaraugusto in #15767
  • fix(html): keep the doctype when a comment is above it by @LingyuCoder in #15778
  • fix(types): allow RslibPlugin without options by @chenjiahan in #15801
  • fix: ignore fragment-only CSS URL dependencies by @intellild in #15800
  • fix(bench): exclude compiler teardown from runtime requirements by @intellild in #15813
  • fix(types): declare code generation Sources.get and migrate configs by @chenjiahan in #15814
  • fix(types): allow RegExp resolve restrictions and migrate configs by @chenjiahan in #15819
  • fix(cli): initialize profiling once for multiple configs by @chenjiahan in #15829

Document 📖

Other Changes

Full Changelog: v2.2.6...v2.2.7

⌂ 换网址