π See Announcing Rspack 1.6 for more details.
What's Changed
Performance Improvements β‘
- perf(browser): minor performance optimization for @rspack/browser by @CPunisher in #11795
- perf(swc_plugin_import): replace handlebars with custom template engine by @chenjiahan in #11852
- perf(cli): switch to cac and refactor code by @chenjiahan in #11893
- perf: replace graceful-fs with node:fs by @chenjiahan in #11894
- perf: remove JS side config validation by @chenjiahan in #11897
- perf(core): adjust default_blocking_threads to 4 in linux with slower fs by @hardfist in #11908
- perf: add support for module.unsafeCache configuration by @SyMind in #11898
- perf: don't drop rust compiler instance in non-watch mode by @hardfist in #11920
- perf: move crypto imports to lazy require calls by @chenjiahan in #11930
- perf: replace node:assert with explicit error checks by @chenjiahan in #11928
- perf(cli): replace colorette with picocolors by @chenjiahan in #11932
- perf: lazy load node:worker_threads to improve startup time by @chenjiahan in #11931
- perf(cli): simplify ESM file detection by @chenjiahan in #11946
- perf: use ustr for resource_identifier to avoid multiple copies by dependencies by @JSerFeng in #12036
New Features π
- feat(mf): runtimePlugins support pass params by @2heal1 in #11818
- feat(browser): support modulesinBrowserRequirePluginby @CPunisher in #11822
- feat(mf): support lazy compilation by @2heal1 in #11779
- feat: enable lazy barrel by default by @ahabhgk in #11841
- feat: rslib supports add shims for js/esm by @JSerFeng in #11840
- feat: eval simple expression for enum member by @ahabhgk in #11859
- feat: implement extractSourceMapoption by @colinaaa in #11814
- feat(esm): remove empty unneeded runtime chunks by @JSerFeng in #11892
- feat(create-rspack): add type annotations to JS configs by @chenjiahan in #11896
- feat: support defer import by @ahabhgk in #11871
- feat: EsmLibraryPlugin supports preserveModules by @JSerFeng in #11921
- feat: introduce allocative by @quininer in #11927
- feat(browser): re-export memfsby @CPunisher in #11942
- feat: handle renamed webpack_require by compatibility plugin by @JSerFeng in #11975
- feat(browser): support CORS worker and custom wasm url by @CPunisher in #11996
- feat(create-rspack): add AGENTS.md by @chenjiahan in #12002
- feat: if no commonjs specific syntax detected, treat module as esm by @JSerFeng in #12008
- feat: support ignoreList option in SourceMapDevToolPlugin by @SyMind in #12029
- feat: EsmLibraryPlugin can override invalid user config by @JSerFeng in #12028
Bug Fixes π
- fix(loader-runner): add missing break statements in switch cases by @chenjiahan in #11794
- fix: revert "fix: remove serdefeature oflightningcss(#11706)" by @colinaaa in #11796
- fix: correct stats.colortype to include fine-grained options by @chenjiahan in #11797
- fix: export interop default symbol and ensure import required chunks by @JSerFeng in #11793
- fix: should re-export real exportInfo when export dynamic js by @JSerFeng in #11776
- fix: should process runtime chunk after normal chunks of same chunk group by @LingyuCoder in #11778
- fix: should use external source as name hint by @JSerFeng in #11825
- fix(swc_plugin_import): fix panic and optimize diagnostic logs by @chenjiahan in #11862
- fix: distinguish external modules when there are import attributes by @fi3ework in #11845
- fix: should render default exports for cjs entry and json entry by @JSerFeng in #11860
- fix: should export from entry chunk for cjs reexport default by @JSerFeng in #11884
- fix: should not cache dependency instance in DynamicEntryPlugin by @SyMind in #11888
- fix: updated dependencies sync to persistent cache by @jerrykingxyz in #11910
- fix: no need to create compiler instance when closing compiler by @chenjiahan in #11923
- fix: should allow override can_inline_use in flag dependency usage plugin by @ahabhgk in #11934
- fix: perf regression caused by is_deferred by @ahabhgk in #11944
- fix(create-rspack): polish README and configurations by @chenjiahan in #11953
- fix(mf): federation modules plugin hooks leak by @quininer in #11929
- fix(swcLoader): should correctly generate the default value of env_na⦠by @Zeahan in #11906
- fix(types): add createReadStream to OutputFileSystem interface by @chenjiahan in #11963
- fix: improve type safety for MultiStats options by @chenjiahan in #11964
- fix: should support entries() for compilation.chunks by @SyMind in #11971
- fix: esm output chunk module missing load dependent chunks by @stormslowly in #11945
- fix: inline value for multiple runtime by @ahabhgk in #11983
- fix: unknown defined properties for exported enum by @ahabhgk in #11992
- fix: compilation.*_dep.added should not contains updated files by @jerrykingxyz in #11991
- fix: side effects optimize panic when remove lib file by @jerrykingxyz in #11939
- fix: should only top-level require wrapped modules for import side-effect specifier by @JSerFeng in #11997
- fix: use asset resource module as entry by @LingyuCoder in #11993
- fix: Remove some unnecessary unsafe by @quininer in #12006
- fix: type definitions for devtool module filename templates by @chenjiahan in #12013
- fix: incremental wrong provided exports results caused panic when delete module by @ahabhgk in #12009
- fix: rayon iterator.consume will block in WASM by @jerrykingxyz in #12022
- fix: calculate side effects of call exprs in seq expr by @LingyuCoder in #12017
- fix: should remove related correctly in compilation.updateAsset by @LingyuCoder in #12031
- fix: should resplace resource query in context replacement plugin by @LingyuCoder in #12033
- fix(wasm): add another SharedArrayBuffer instance check by @CPunisher in #12037
Refactor π¨
- refactor: update type definitions to fix Rslint issues by @chenjiahan in #11798
- refactor: remove experiments.layers by @JSerFeng in #11819
- refactor: output.charset false by default by @JSerFeng in #11837
- refactor: make artifact collect affected dependencies by @jerrykingxyz in #11905
- refactor: clean up default stats plugins by @chenjiahan in #11904
- refactor: consolidate ModuleError and ModuleWarning classes by @chenjiahan in #11935
- refactor(watcher): split watcher from rspack_fsby @h-a-n-a in #11948
- refactor(core): Convert BoxModule from type alias to newtype struct by @kdy1 in #11978
- refactor: normal module build by @SyMind in #11973
- refactor: side effects parser plugin by @LingyuCoder in #12014
- refactor: source return string or buffer by @SyMind in #12023
- refactor: EsmLibraryPlugin should hold itself lock of data by @JSerFeng in #12035
Document Updates π
- docs: improve documentation for stats properties by @chenjiahan in #11792
- docs: explain how resolve.aliasaffects package resolution by @SyMind in #11799
- docs(browser): add usage of useInputFileSystemto "In-Memory File system" section by @CPunisher in #11833
- docs(browser): Add compatibility with resolve.aliasdescription for BrowserHttpImportEsmPlugin by @CPunisher in #11838
- docs(config): optimization.chunkIds update by @vsn4ik in #11900
- docs: add guide for setting thread pool size via environment variable by @chenjiahan in #11912
- docs: fix zh readme miss two line in credits by @WuMingDao in #11917
- docs: sync zh and en readme by @WuMingDao in #11918
- docs: add layer feature guide doc by @JSerFeng in #11985
- docs: update roadmap content for Rspack 2.0 by @chenjiahan in #11994
- docs: update team members list by @chenjiahan in #12000
- docs: update webpack loader repository links by @chenjiahan in #12010
- docs: add docs for experiements.deferImportby @ahabhgk in #12018
- docs: add Cloudflare and YouMind logos to who is using by @chenjiahan in #12039
Other Changes
- test: run webpack multi compiler test cases with test tools by @LingyuCoder in #11787
- test: fix hot update loader by @LingyuCoder in #11774
- chore: rspack_plugin_esm_library should have description by @SyMind in #11789
- chore: upgrade mf runtime tools to v0.19.1 by @ahabhgk in #11788
- test: run webpack stats cases with test tools by @LingyuCoder in #11791
- chore(deps): update dependency @rslib/core to v0.15.0 by @renovate[bot] in #11748
- chore(deps): lock file maintenance by @renovate[bot] in #11783
- chore(deps): update dependency typescript to ^5.9.3 by @renovate[bot] in #11802
- chore(deps): update patch npm dependencies by @renovate[bot] in #11801
- chore(deps): update dependency memfs to v4.48.1 by @renovate[bot] in #11807
- chore(deps): update dependency zx to v8.8.4 by @renovate[bot] in #11811
- test: run webpack example cases with test tools by @LingyuCoder in #11820
- test: run webpack watch cases with test tools by @LingyuCoder in #11821
- chore(deps): update dependency @microsoft/api-extractor-model to v7.31.1 by @renovate[bot] in #11816
- chore(deps): update pnpm to v10.18.1 by @renovate[bot] in #11812
- test: skip flaky test cases by @stormslowly in #11827
- test: run webpack hot cases with test tools by @LingyuCoder in #11826
- test: add type of test config files by @LingyuCoder in #11831
- test: add missing await in basic tests by @deepcoldy in #11824
- test: align more test cases with webpack by @LingyuCoder in #11834
- chore(wasm): bump and fix @napi-rs/wasm-runtime by @CPunisher in #11836
- test: run webpack error cases with test tools by @LingyuCoder in #11839
- chore: avoid lazy compilation mf e2e flaky by @ahabhgk in #11843
- test: remove webpack tests by @LingyuCoder in #11842
- chore(deps): update patch npm dependencies by @renovate[bot] in #11806
- ci: fix lazy-compilation persistent cache e2e case by @jerrykingxyz in #11844
- chore: fix Node typeless warning when building packages by @chenjiahan in #11847
- chore: clean up TODO comments and simplify code by @chenjiahan in #11848
- test: sync webpack config test cases to rspack by @LingyuCoder in #11853
- test: inject test and rspack pathes by @LingyuCoder in #11856
- test: remove legacy builtin configuration of builtin test cases by @LingyuCoder in #11857
- chore: fix invalid lint:rs script in package.json by @chenjiahan in #11863
- test: rename all webpack config files to rspack by @LingyuCoder in #11864
- test: remove template.mdandreadme.mdin webpack-examples by @LingyuCoder in #11865
- test: move test scripts to test tools by @LingyuCoder in #11866
- chore(swc_plugin_import): inherit workspace lint config by @chenjiahan in #11867
- test: remove legacy supports checker and test filter by @LingyuCoder in #11868
- test: use new hot update plugin to run legacy hot cases by @LingyuCoder in #11870
- chore: avoid using BROWSERenv by @colinaaa in #11855
- test: use promise instead of done callback by @9aoy in #11872
- chore(deps): update pnpm to v10.18.3 by @renovate[bot] in #11875
- chore: enable some Rslint rules by @chenjiahan in #11869
- chore(deps): update patch npm dependencies by @renovate[bot] in #11874
- chore(deps): update github-actions by @renovate[bot] in #11873
- chore: remove outdated OTP release scripts by @chenjiahan in #11885
- chore(deps): update dependency @playwright/test to v1.56.0 by @renovate[bot] in #11876
- chore: eliminate pnpm install platform warnings by @chenjiahan in #11889
- chore: clean up unused dependencies in test tools package by @chenjiahan in #11886
- chore(deps): update dependency react-refresh to ^0.18.0 by @renovate[bot] in #11810
- test(normalCases): use promise instead of done callback by @9aoy in #11879
- chore(deps): upgrade zod from v3 to v4 and update imports by @chenjiahan in #11883
- chore: Using env to enable sftrace by @quininer in #11880
- test: rewrite hot test cases with NEXT_HMR by @LingyuCoder in #11882
- test: migrate config tests to rstest by @9aoy in #11895
- test: use jsdom runner to run most cases by @LingyuCoder in #11901
- test: Revert 'migrate config tests to rstest (#11895)' by @9aoy in #11902
- test: add warn while closing compiler with failure by @LingyuCoder in #11909
- test: migrate config tests to rstest by @9aoy in #11911
- ci: fix lazy-compilation/persistent-cache ci failed by @jerrykingxyz in #11926
- test: use jsdom runner to run all cases by @LingyuCoder in #11924
- chore: enable Rslint rule: no-empty-interface by @shuga2704 in #11915
- chore: switch to self-hosted macOS runners by @stormslowly in #11925
- chore: fix rustflags not work for dev profile by @quininer in #11936
- test: display error location in jsdom by @LingyuCoder in #11937
- chore(deps): update patch npm dependencies by @renovate[bot] in #11957
- chore(deps): update dependency @arco-design/web-react to ^2.66.6 by @renovate[bot] in #11958
- chore(deps): update dependency @module-federation/runtime-tools to v0.21.1 by @renovate[bot] in #11959
- chore(deps): update crates swc_core to v45.0.1 by @chenjiahan in #11951
- test: enable hideSkippedTestsoption by @9aoy in #11952
- chore(deps): update dependency @rslib/core to v0.16.0 by @renovate[bot] in #11960
- test: migrate more tests to rstest by @9aoy in #11947
- test: remove runtime diff test tool by @LingyuCoder in #11968
- test: remove types of test tools that related to webpack by @LingyuCoder in #11970
- chore(ci): fix flaky mf container-1-5 test cases by @stormslowly in #11954
- test: no need to support multiples scope in one test case by @LingyuCoder in #11972
- test: use rstest's default reporters in CI by @9aoy in #11981
- chore(ci): set timeout for pnpm setup action by @stormslowly in #11976
- chore(deps): bump Rslib 0.16.1 to use better browserlist for es6 syntax by @Timeless0911 in #11984
- chore(build): add missing type declaration for rslib config by @situ2001 in #11982
- test: add debug mode of test tools by @LingyuCoder in #11987
- chore: enable Rslint rule: @typescript-eslint/no-redundant-type-constituents by @json-q in #11986
- test: fix rstest tests not found in windows by @9aoy in #11995
- test: migrate cli tests to rstest by @9aoy in #11989
- chore(ci): improve window cache speed with zstd by @stormslowly in #11961
- chore: remove injected test code in diff test cases by @LingyuCoder in #12001
- chore: rspack-resolver bump to 0.6.4 by @stormslowly in #12004
- test: should not panic for mf sharing asset modules by @ahabhgk in #12003
- test: bump rstest to fix RSTEST_WORKER_ID by @9aoy in #12011
- chore: rm unsued cached source by @SyMind in #11754
- chore(deps): update github-actions by @renovate[bot] in #12026
- chore(deps): update patch npm dependencies by @renovate[bot] in #12027
- test: enable more cases by @LingyuCoder in #12021
- test: migrate more jest tests to rstest by @9aoy in #12030
- test: migrate jest lazy tests to rstest by @9aoy in #12034
- chore(deps)!: bump swc_core to v46 by @CPunisher in #12032
New Contributors
- @deepcoldy made their first contribution in #11824
- @WuMingDao made their first contribution in #11917
- @shuga2704 made their first contribution in #11915
- @Zeahan made their first contribution in #11906
- @situ2001 made their first contribution in #11982
- @json-q made their first contribution in #11986
Full Changelog: v1.5.8...v1.6.0