See Announcing Rspack 1.2 for more details.
What's Changed
Performance Improvements ⚡
- perf: ignore watching files in node_modules by @chenjiahan in #8645
- 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
ofrspack-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
- perf: persistent cache regenerate artifact.*_dependencies from module_graph by @jerrykingxyz in #9004
- perf: persistent cache use multi-thread by @jerrykingxyz in #9010
- perf: add iterator consumer to improve performance by @jerrykingxyz in #9014
Exciting New Features 🎉
- feat: pass compiler_path to rust Compiler by @jerrykingxyz in #8665
- feat: cache storage by @LingyuCoder in #8466
- feat(incremental): named chunk ids by @ahabhgk in #8652
- feat: support additional-pass hook by @SyMind in #8672
- feat: improve cache storage by @LingyuCoder in #8675
- feat: exports info binding API by @SyMind in #8677
- feat: chunkGraph.getModuleId binding API by @SyMind in #8680
- feat: persistent cache by @jerrykingxyz in #8687
- feat: support
size
option for optimization.chunkIds config by @inottn in #8642 - feat: do not cleanup Rust instance by @h-a-n-a in #8702
- feat: export
WarnCaseSensitiveModulesPlugin
and disable it by default by @ahabhgk in #8697 - feat: cache storage move lock file by @LingyuCoder in #8686
- feat: addInclude binding API by @SyMind in #8713
- feat: update experiments.cache signature by @jerrykingxyz in #8729
- feat(mf): bump @module-federation/runtime-tools to 0.8.4 by @chenjiahan in #8728
- feat!: align AssetGeneratorDataUrlFunction with webpack by @inottn in #8614
- feat: support module.generator.outputPath by @inottn in #8554
- feat: add macro to get rspack version by @jerrykingxyz in #8760
- feat: persistent cache expose error to compilation.diagnostic by @jerrykingxyz in #8765
- feat: persistent cache in production mode wait for save to complete by @jerrykingxyz in #8777
- feat: split big chunks based on modules path similarities by @JSerFeng in #8775
- feat: add help message for version check by @h-a-n-a in #8774
- feat: splitChunks.cacheGroups.filename supports function by @JSerFeng in #8779
- feat: bench js api by codspeed by @SyMind in #8808
- feat: support module graph connection js api by @SyMind in #8812
- feat: support
match_when_empty
for rule condition by @CPunisher in #8809 - feat: add context info issuer layer for external function by @ahabhgk in #8832
- feat: add new optimization.avoidEntryIife config by @fi3ework in #8814
- feat(incremental): side effects optimization by @ahabhgk in #8799
- feat: set default SWC minimizer passes to
2
to reduce bundle size by @chenjiahan in #8853 - feat: initialize compiler options builder by @h-a-n-a in #8857
- feat(storage): improve storage memory by @LingyuCoder in #8847
- feat: support set build info in js side by @SyMind in #8893
- feat: support invalidate persistent cache using
config.mode
andconfig.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 - feat: initialize builtin plugins in compiler options builder by @h-a-n-a in #8954
- feat: support externals in compiler builder options by @h-a-n-a in #8959
- feat: support chunkGroup.getModulePreOrderIndex by @JSerFeng in #8588
- feat(core): bump swc_core to 9.0.0 by @andersk in #8639
- feat(core): bump swc_core to 10.0.1 by @GiveMe-A-Name in #8967
- feat(core): add Yarn PnP support by @hardfist in #7639
- feat: support
optimization
in compiler options builder by @h-a-n-a in #8979 - feat: make builtin plugin options ordered in compiler options builder by @h-a-n-a in #8980
- feat: support custom parser for
json
type by @cbbfcd in #8947 - feat(core): bump swc_core to 10.1.0 by @GiveMe-A-Name in #8995
- feat: add tracing instrument for persistent cache by @jerrykingxyz in #9001
- feat: mark
@rspack/tracing
as peer dependency by @h-a-n-a in #9008 - feat: initial support for compiler builder by @h-a-n-a in #9015
- feat(plugin-asset): support
generator['asset'].importMode
for Rslib by @SoonIter in #8724 - feat: Add support for debug IDs by @timfish in #8943
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 receive error correctly by @JSerFeng in #8827
- fix(rspack-test-tools): use
process.cwd()
when outside Rspack by @colinaaa in #8845 - fix(incremental): build chunk graph with runtime chunk true by @ahabhgk in #8866
- fix: persistent cache save ModuleArgumentDependency.id by @jerrykingxyz in #8870
- fix(incremental): activate inactive module not codegen by @ahabhgk in #8871
- fix: should recognize negative preload value by @JSerFeng in #8862
- fix: correct css modules hashing to match Webpack when leading digit #8735 by @daveskybet in #8778
- fix: rspack_version macro support match alpha version by @jerrykingxyz in #8880
- fix: rspack_version macro use json to parse package.json by @jerrykingxyz in #8883
- fix: channal error when using sync externals function by @LingyuCoder in #8884
- fix: add stdout draw target to multi progress by @LingyuCoder in #8889
- fix: source-map-devtool-plugin file context option by @SyMind in #8888
- fix: transform nested webpack require with innerGraph enabled by @JSerFeng in #8908
- fix: get resolved module by @SyMind in #8906
- fix: include versions in error message for version mismatch by @haocheng6 in #8899
- fix: allow custom
lazyCompilation.backend.client
by @colinaaa in #8934 - fix: lazy compilation use persistent cache restart failure by @jerrykingxyz in #8952
- fix: removal of unecessary underscore logic in escape job #8735 by @daveskybet in #8958
- fix: should recalculate order indices in outdated entrypoint by @JSerFeng in #8970
- fix(type): Add missing OptimizationSplitChunksNameFunction param by @Lemonexe in #8707
- fix: merge global parser and generator options by @inottn in #8984
- fix(core): calculate pkgJson from configPath dir by @hardfist in #8985
- fix: should run invalidation when watching is invalid by @JSerFeng in #8966
- fix(types): missing
lazyCompilation.backend.server
option by @chenjiahan in #9009
Document Updates 📖
- docs: invite @GiveMe-A-Name @nyqykk to Rspack core team by @chenjiahan in #8684
- docs: clarify support for JavaScriptModulesPlugin as partial by @steverep in #8678
- docs: fix webpack plugins overview docs panic for zh lang by @SyMind in #8689
- docs: fix link for bundle size link in English locale by @31piy in #8692
- docs: improve
resolve.mainFields
by @chenjiahan in #8703 - docs: React Compiler for React 17 and 18 by @chenjiahan in #8708
- docs: persistent cache by @jerrykingxyz in #8725
- docs: rewrite
SwcJsMinimizerRspackPlugin
by @chenjiahan in #8745 - docs: add
loaderContext.importModule()
by @chenjiahan in #8821 - docs: update output.clean type declaration by @cbbfcd in #8826
- docs: add FAQ for SWC plugin version unmatched by @chenjiahan in #8829
- docs: add Google and DeepSeek to who is using by @chenjiahan in #8865
- docs: make LoaderContext documentation more friendly by @chenjiahan in #8869
- docs: update persistent cache available version and configuration by @jerrykingxyz in #8886
- docs: correct
avoidEntryIife
added version by @fi3ework in #8892 - docs: persistent cache example set root.cache to true by @jerrykingxyz in #8894
- docs: fix typo in builtin-plugin.md by @stormslowly in #8897
- docs: complete
WarnCaseSensitiveModulesPlugin
by @chenjiahan in #8898 - docs: add warning about hmr fails when filename has hash by @LingyuCoder in #8917
- docs: add loader API overview page by @chenjiahan in #8928
- docs(glossary): use "module specifier" instead of "request" by @chenjiahan in #8933
- docs: add persistent cache invalidation notes by @jerrykingxyz in #8921
- docs: fix canary package name by @JSerFeng in #8969
- docs: update blog list by @chenjiahan in #8971
- docs: unify title capitalization style by @chenjiahan in #8973
- docs: unify title capitalization style for more docs by @chenjiahan in #8983
- docs: fix loader API getLogger types documentation by @JamesNimlos in #8982
- docs: add persistent cache migration by @jerrykingxyz in #8978
- docs: add
invalid
compiler hook by @chenjiahan in #9003 - docs: prefer to use named import and destructuring require by @chenjiahan in #9005
Other Changes
- chore(deps): update cargo-bins/cargo-binstall action to v1.10.16 by @renovate in #8656
- chore(deps): update dependency prettier to v3.4.2 by @renovate in #8660
- chore(deps): update pnpm to v9.15.0 by @renovate in #8662
- chore(workflow): set Issue types by @chenjiahan in #8663
- chore(deps): update dependency @rspack/dev-server to v1.0.10 by @renovate in #8659
- refactor: chunk graph binding API by @SyMind in #8648
- refactor: simplify file system code by @nilptr in #8654
- chore: update API change by @h-a-n-a in #8700
- chore(deps): bump textwrap 0.16 for deduplication by @chenjiahan in #8699
- refactor: unify the logic of
span_to_location
into traitSourcePosition
by @shulaoda in #8640 - chore: upgrade Rust to 1.83.0 nightly by @andersk in #8712
- chore(renovate): Enable lockFileMaintenance by @andersk in #8715
- chore(deps): update rspress to v1.38.0 by @renovate in #8719
- chore(deps): update dependency mermaid to v11 by @renovate in #8720
- revert: Revert "chore: sanitize file paths" by @h-a-n-a in #8721
- chore(deps): update dependency check-dependency-version-consistency to v5 by @renovate in #8718
- chore(deps): update dependency is-ci to v4 by @renovate in #8723
- chore(ci): only trim-paths on release and enable renovate update Cargo.lock by @h-a-n-a in #8722
- chore(deps): update rust crate rspack_resolver to 0.3.6 by @renovate in #8717
- chore(deps): update rust crate napi to 3.0.0-alpha.23 by @renovate in #8661
- chore(deps): update dependency rimraf to v5 by @renovate in #8727
- chore(deps): remove dependency internal-ip by @renovate in #8733
- chore(deps): remove dependency mkdirp by @renovate in #8734
- chore(deps): update dependency glob to v11 by @renovate in #8738
- chore(deps): update typescript and @microsoft/api-extractor by @renovate in #8737
- chore(deps): stop updating inventory with renovate ci by @h-a-n-a in #8742
- chore(deps): update crates by @renovate in #8657
- ci: linux-musl build failed by @jerrykingxyz in #8743
- ci: build linux debug binary directly for CI purpose to speedup PR check by @xc2 in #7243
- ci: should skip trim paths for doc changes by @chenjiahan in #8750
- chore(deps): update github-actions by @renovate in #8752
- refactor: improve storage error message by @LingyuCoder in #8740
- refactor: merge binding crates into
rspack_binding_values
by @h-a-n-a in #8761 - ci: use ubuntu-22.04 by @h-a-n-a in #8776
- chore: remove all unnecessary workflow by @hardfist in #8783
- chore: remove issue_comment trigger from CI by @chenjiahan in #8784
- ci: remove useless variable in release-pull-request.yml by @jerrykingxyz in #8787
- refactor: remove as much
getRawOptions
as possible by @h-a-n-a in #8773 - chore(deps): update napi by @renovate in #8771
- chore(napi/build): disable dts cache of napi build by @h-a-n-a in #8795
- ci: disable pkg preview by @LingyuCoder in #8794
- ci: disable miri, eco-ci and benchmark check by @LingyuCoder in #8797
- ci: add security pr type by @LingyuCoder in #8796
- ci: add @GiveMe-A-Name to team label by @LingyuCoder in #8810
- build: remove no-dts-cache by @h-a-n-a in #8819
- chore: split canary to separate scope by @hardfist in #8828
- chore(deps): update crates by @renovate in #8840
- chore(deps): update pnpm to v9.15.1 by @renovate in #8841
- chore: remove unnecessary TODOs by @shulaoda in #8850
- chore(deps): update rspress to v1.39.2 by @renovate in #8842
- style: use inlined args for
format!
by @hamirmahal in #8228 - chore: ignore style changes in git blame #8228 by @h-a-n-a in #8852
- test: add cache test cases by @jerrykingxyz in #8854
- chore(deps): bump Rslib to v0.2.2 by @chenjiahan in #8859
- test: split incremental test cases to run in parallel by @LingyuCoder in #8860
- chore(deps): update crates by @renovate in #8858
- test: refresh modified file mtime when run NEXT_START by @jerrykingxyz in #8863
- chore(deps): upgrade miette 7.2.0 to 7.4.0 by @andersk in #8864
- chore(deps): lock file maintenance by @renovate in #8805
- ci: add ecosystem benchmark by @jerrykingxyz in #8868
- chore: update version to match the latest release by @chenjiahan in #8872
- chore(deps): Upgrade @types/node 20.12.7 to 20.17.10 by @andersk in #8867
- chore: add profile choice for release canary by @hardfist in #8874
- chore(deps): update dependency css-loader to v7 by @renovate in #8024
- chore: change input_filesystem to ReadableFileSystem by @hardfist in #8878
- test: easier way to write hmr test cases by @LingyuCoder in #8849
- ci: remove nightly release by @jerrykingxyz in #8885
- refactor(incremental): introduce mutation update module by @ahabhgk in #8891
- test: add persistent cache test by @jerrykingxyz in #8890
- ci: fix ecosystem-benchmark test pr failed by @jerrykingxyz in #8902
- refactor: better storage error format by @LingyuCoder in #8909
- chore(deps): update pnpm to v9.15.2 by @renovate in #8913
- chore(deps): update rspress to v1.39.3 by @renovate in #8914
- chore(deps): update github-actions by @renovate in #8912
- ci: fix documentation coverage check by @chenjiahan in #8907
- test: clean up unused dev dependencies by @chenjiahan in #8919
- fix(modern-module): skip the asset entry module concaten for Rslib by @SoonIter in #8837
- ci: ecosystem-benchmark checkout failed by @jerrykingxyz in #8923
- chore(deps): Upgrade and pin webpack to 5.95.0 by @andersk in #8918
- ci: use corepack instead of pnpm/action-setup by @jerrykingxyz in #8926
- ci: pnpm cache install pnpm/exe when node16 by @jerrykingxyz in #8929
- ci: add ecosystem ci by @jerrykingxyz in #8931
- ci: enable ecosystem-ci on main branch by @jerrykingxyz in #8932
- chore(deps): update crates by @renovate in #8911
- refactor: move compiler options builder to new crate by @h-a-n-a in #8941
- ci: ecosystem-ci runs on ubuntu-22.04 by @jerrykingxyz in #8955
- chore:
run_loaders
takes a single plugin only by @wtlin1228 in #8968 - refactor: tracing by @h-a-n-a in #8195
- chore: fix typo in rspack_core/src/module.rs by @cbbfcd in #8986
- chore(deps): update pnpm to v9.15.3 by @renovate in #8989
- chore(deps): update rspress to v1.39.4 by @renovate in #8990
- chore(deps): update dependency jsdom to v26 by @renovate in #8991
- chore(deps): update github-actions by @renovate in #9013
- chore(deps): update lightningcss to v1.0.0-alpha.63 by @GiveMe-A-Name in #8997
- ci: declare minimal permissions for Actions by @chenjiahan in #9018
- ci: fix workflow permission issues by @chenjiahan in #9021
- feat: hoist compiler options builder to
Compiler::builder
by @h-a-n-a in #9020 - docs: rewrite CLI documentation by @chenjiahan in #9028
- chore(deps): bump prebundle v1.2.7 to disable CI cache by @chenjiahan in #9029
- perf: persistent cache recovery use consumer mode by @jerrykingxyz in #9019
- docs: improve hot module replacement by @chenjiahan in #9036
- ci: ecosystem ci shows errors only on comment by @jerrykingxyz in #9032
- fix: patched mimalloc to use
MADV_DONTNEED
thanMADV_FREE
on Linux by @h-a-n-a in #9037 - chore(deps): update rspress to v1.40.0 by @renovate in #9039
- perf: disable js tracing in non-profile mode by @hardfist in #9046
- refactor: introducing the faster code-splitting algorithm by @JSerFeng in #8823
- fix: skip mf tests for new code splitting by @JSerFeng in #9047
- fix(core): upgrade rspack_resolver to 0.5.0 by @hardfist in #9048
- chore(deps): update dependency zx to v8 by @renovate in #9044
- fix: align
amd
option behavior with webpack by @nilptr in #9011 - docs: add parallel code splitting docs by @JSerFeng in #9051
- feat(stats): add module reason locations and module trace dependencies by @LingyuCoder in #9049
- feat: using runtime_template to support output.environment by @GiveMe-A-Name in #9052
- feat: support more options in compiler builder by @h-a-n-a in #9053
- fix: 🐛 align get provided exports with webpack by @stormslowly in #9050
- test: add basic rust benchmark by @h-a-n-a in #9054
- feat: add chunkGraph.getNumberOfEntryModules by @colinaaa in #9035
- fix: add issue permission for release workflow by @jerrykingxyz in #9066
New Contributors
- @steverep made their first contribution in #8678
- @31piy made their first contribution in #8692
- @hamirmahal made their first contribution in #8228
- @daveskybet made their first contribution in #8778
- @haocheng6 made their first contribution in #8899
- @Lemonexe made their first contribution in #8707
- @JamesNimlos made their first contribution in #8982
- @timfish made their first contribution in #8943
Full Changelog: v1.1.8...v1.2.0