Releases: web-infra-dev/rsbuild
v1.5.2
What's Changed
New Features π
- feat(deps): update dependency @rspack/core to v1.5.1 by @chenjiahan in #5971
- feat(plugin-react): improve transpilation scope of ReactRefreshPlugin by @chenjiahan in #5969
- feat: support for destructuring
import.meta.envby @chenjiahan in #5979
Bug Fixes π
- fix: rerun onBeforeDevCompile hook correctly with multiple environments by @9aoy in #5980
- fix: failed to escape undefined template params by @chenjiahan in #5987
Refactor π¨
- refactor(types): use
LoaderDefinitionto declare loader types by @chenjiahan in #5975
Document π
- docs: improve authenticity and natural expression by @Copilot in #5964
- docs: improve documentation authenticity and readability by @Copilot in #5972
- docs: improve authenticity in documentation files by @Copilot in #5984
- docs: improve English authenticity in documentation by @Copilot in #5988
- docs: add example for
cssModules.autoconfiguration by @chenjiahan in #5989 - docs: fix JavaScript syntax errors in static-assets.mdx by @Copilot in #5992
Other Changes
- chore(deps): update sass related packages by @renovate[bot] in #5965
- test(e2e): do not rely on building URL to verify lazy compilation by @JSerFeng in #5966
- chore(plugin-react): update @rspack/plugin-react-refresh to ^1.5.0 by @chenjiahan in #5968
- release: @rsbuild/plugin-react v1.4.0 by @chenjiahan in #5970
- Revert "fix: temporarily disable inline enum optimization (#5960)" by @chenjiahan in #5974
- test(e2e): add new cases to verify enum with property access by @chenjiahan in #5976
- chore(deps): update dependency @types/node to ^22.18.0 by @renovate[bot] in #5978
- chore(deps): update dependency @rsbuild/plugin-react to ^1.4.0 by @renovate[bot] in #5977
- chore(deps): update dependency @shikijs/transformers to ^3.12.0 by @renovate[bot] in #5991
- chore: remove duplicated dependencies via pnpm dedupe by @Copilot in #5990
- docs: fix various documentation errors including grammar, consistency and terminology by @Copilot in #5993
- docs: fix various documentation errors across website/docs directory by @Copilot in #5994
- release: v1.5.2 by @chenjiahan in #5995
Full Changelog: v1.5.1...v1.5.2
v1.5.1
What's Changed
Bug Fixes π
- fix: temporarily disable inline enum optimization by @chenjiahan in #5960
Document π
- docs: improve plugin type documentation by @chenjiahan in #5954
Other Changes
- chore(deps): update dependency @rsbuild/core to ^1.5.0 by @renovate[bot] in #5957
- chore(deps): update dependency @rstest/core to ^0.3.0 by @renovate[bot] in #5958
- release: 1.5.1 by @chenjiahan in #5961
Full Changelog: v1.5.0...v1.5.1
v1.5.0
π See Announcing Rspack 1.5 for more details.
What's Changed
Breaking changes π‘
- feat!: update minimum Node.js version to 18.12.0 by @chenjiahan in #5786
New Features π
- feat: add
onBeforeDevCompileplugin hook by @9aoy in #5788 - feat: improve command descriptions and documentations by @chenjiahan in #5792
- feat(plugin-less): support for parallel loader execution by @chenjiahan in #5805
- feat: allow to custom Wasm filename hash by @chenjiahan in #5807
- feat(deps): update @rspack/core to v1.5.0-beta.0 by @chenjiahan in #5818
- feat: add experimental ESM output support for node target by @chenjiahan in #5823
- feat: enable lazyCompilation.imports by default by @GiveMe-A-Name in #5824
- feat(client): improve log messages for overlay and socket by @chenjiahan in #5849
- feat: add new
onAfterDevCompileplugin hook by @chenjiahan in #5882 - feat(deps): update @rspack/core to v1.5.0-beta.1 by @chenjiahan in #5884
- feat(core): expose modifyRsbuildConfig method in instance by @chenjiahan in #5898
- feat(core): expose modifyEnvironmentConfig method in instance by @chenjiahan in #5899
- feat(core): add
exposeAPI to Rsbuild instance by @chenjiahan in #5910 - feat: support function type of
performance.printFileSize.totalby @Timeless0911 in #5915 - feat: add more params for
performance.printFileSize.totalby @Timeless0911 in #5943 - feat(deps): update @rspack/core to v1.5.0 by @chenjiahan in #5950
Performance π
- perf: update build configs to target ES2022 by @chenjiahan in #5790
- perf: remove pre-bundling of postcss-load-config by @chenjiahan in #5808
- perf: enable Rspack's barrel file optimization by default by @chenjiahan in #5840
- perf: enable Rspack's inline enum optimization by @chenjiahan in #5841
Bug Fixes π
- fix(cli): ensure consistent spacing for npx of node 20+ by @chenjiahan in #5791
- fix(cli): skip greeting when help is requested by @chenjiahan in #5794
- fix(cli): ensure consistent spacing for node run script by @chenjiahan in #5813
- fix(server): adjust indentation in debug log message by @chenjiahan in #5826
- fix(hmr): remove redundant condition check by @chenjiahan in #5828
- fix: update lazyCompilation config to fix deprecation warning by @chenjiahan in #5829
- fix(cache): handle fs operations errors by @chenjiahan in #5839
- fix(types): loosen plugin apply type to support older versions by @chenjiahan in #5842
- fix: failed to create multiple HMR connections by @chenjiahan in #5844
- fix(server): handle Deno compatibility in public dir copy by @chenjiahan in #5852
- fix: do not allow to disable filename hash of Wasm files by @chenjiahan in #5854
- fix: ensure inspectConfig properly initializes action before execution by @chenjiahan in #5859
- fix: add
OnDevCompileDoneFntype for backward compatibility by @chenjiahan in #5913 - fix: floating promise in rspackProfile plugin by @chenjiahan in #5926
- fix(plugin-vue): allow CSS Modules with custom inject names by @escaton in #5931
- fix: enhance raw query regex to support more patterns by @chenjiahan in #5938
- fix: enhance inline query regex to support more patterns by @chenjiahan in #5939
Refactor π¨
- refactor: eliminate switch exhaustiveness checks by @chenjiahan in #5803
- refactor: rename connection to socket for clarity by @chenjiahan in #5850
- refactor: improve debug log messages for better clarity by @chenjiahan in #5902
- refactor(css-plugins): inherit CSS options from the built-in rule by @chenjiahan in #5940
- refactor(fileSize): simplify asset formatting and path handling by @chenjiahan in #5945
Document π
- docs: update JavaScript runtime installation instructions by @chenjiahan in #5787
- docs: add less parallel to build performance guide by @chenjiahan in #5809
- docs: add version info to onBeforeDevCompile hook by @chenjiahan in #5811
- docs: improve code splitting documentation clarity by @chenjiahan in #5816
- docs: mention Rspack's default split chunks strategy by @chenjiahan in #5821
- docs(lazy-compilation): update default value and version history by @chenjiahan in #5837
- docs: Add missing backtick to filename.mdx by @schu34 in #5848
- docs(config): add links to chunk splitting strategies by @chenjiahan in #5845
- docs: update awesome-rspack references to awesome-rstack by @chenjiahan in #5872
- docs: add version info for modifyHTML hook by @chenjiahan in #5886
- docs: fix grammar, spelling, and consistency errors in documentation by @Copilot in #5888
- docs: fix errors, contractions, terminology, and grammar improvements by @Copilot in #5889
- docs: fix documentation errors, grammar, typos, and file references by @Copilot in #5892
- docs: fix grammatical errors and terminology inconsistencies by @Copilot in #5893
- docs: fix various documentation errors including grammar and punctuation issues by @Copilot in #5894
- docs: fix terminology inconsistencies and grammar issues by @Copilot in #5895
- docs: update exclude documentation to clarify priority by @chenjiahan in #5900
- docs: fix various documentation errors by @Copilot in #5903
- docs: add code examples for html tags config options by @chenjiahan in #5904
- docs(plugin-svgr): add note about default exportType with mixedImport by @chenjiahan in #5907
- docs: add exclude option to
printFileSizetype by @chenjiahan in #5908 - docs: update types documentation to reference source file by @chenjiahan in #5912
- docs(config): add security warning about source maps in production by @chenjiahan in #5914
- docs: update Rspress to beta.28 and remove unused openGraph fields by @chenjiahan in #5919
- docs: add documentation for
output.moduleconfig by @chenjiahan in #5923 - docs: update Rstack description and bump doc-ui version by @chenjiahan in #5924
- docs: fix various documentation errors by @Copilot in #5925
- docs: fix grammar and consistency errors in documentation by @Copilot in #5930
- docs: fix grammar issues and contractions by @Copilot in #5934
- docs: fix grammar, punctuation, and clarity issues by @Copilot in #5936
- docs: improve SSR error logging by @chenjiahan in #5947
- docs: rename onDevCompileDone hook to onAfterDevCompile by @chenjiahan in #5883
Other Changes
- test(e2e): replace execSync and npx with a faster helper by @chenjiahan in #5783
- test(e2e): replace direct exec calls with faster helper by @chenjiahan in https://github.com/web-...
v1.4.16
What's Changed
Bug Fixes π
- fix(deps): update launch-editor-middleware dependency to v2.11.1 by @chenjiahan in a26db53
Full Changelog: v1.4.15...v1.4.16
v1.5.0-rc.0
What's Changed
New Features π
- feat(core): add
exposeAPI to Rsbuild instance by @chenjiahan in #5910 - feat(core): expose
modifyRsbuildConfigmethod in instance by @chenjiahan in #5898 - feat(core): expose
modifyEnvironmentConfigmethod in instance by @chenjiahan in #5899 - feat: support function type of
performance.printFileSize.totalby @Timeless0911 in #5915
Bug Fixes π
- fix: add
OnDevCompileDoneFntype for backward compatibility by @chenjiahan in #5913
Refactor π¨
- refactor: improve debug log messages for better clarity by @chenjiahan in #5902
Document π
- docs: add version info for modifyHTML hook by @chenjiahan in #5886
- docs: fix grammar, spelling, and consistency errors in documentation by @Copilot in #5888
- docs: fix errors, contractions, terminology, and grammar improvements by @Copilot in #5889
- docs: fix documentation errors, grammar, typos, and file references by @Copilot in #5892
- docs: fix grammatical errors and terminology inconsistencies by @Copilot in #5893
- docs: fix various documentation errors including grammar and punctuation issues by @Copilot in #5894
- docs: fix terminology inconsistencies and grammar issues by @Copilot in #5895
- docs: update exclude documentation to clarify priority by @chenjiahan in #5900
- docs: fix various documentation errors by @Copilot in #5903
- docs: add code examples for html tags config options by @chenjiahan in #5904
- docs(plugin-svgr): add note about default exportType with mixedImport by @chenjiahan in #5907
- docs: add exclude option to
printFileSizetype by @chenjiahan in #5908 - docs: update types documentation to reference source file by @chenjiahan in #5912
- docs(config): add security warning about source maps in production by @chenjiahan in #5914
Other Changes
- chore: remove unnecessary exports and helpers by @chenjiahan in #5887
- chore: add copilot-instructions.md for GitHub Copilot coding agent by @Copilot in #5891
- docs: fix various documentation errors by @Copilot in #5896
- chore(deps): update playwright monorepo to v1.55.0 by @renovate[bot] in #5897
- chore: change log suffix color from gray to dim by @chenjiahan in #5901
- docs: fix grammatical errors and spelling inconsistencies by @Copilot in #5911
- release: 1.5.0-rc.0 by @chenjiahan in #5918
New Contributors
- @Copilot made their first contribution in #5888
Full Changelog: v1.5.0-beta.4...v1.5.0-rc.0
v1.5.0-beta.4
What's Changed
New Features π
- feat(deps): update @rspack/core to v1.5.0-beta.1 by @chenjiahan in #5884
- feat: add new
onAfterDevCompileplugin hook by @chenjiahan in #5882
Bug Fixes π
- fix: ensure inspectConfig properly initializes action before execution by @chenjiahan in #5859
Document π
- docs: update awesome-rspack references to awesome-rstack by @chenjiahan in #5872
Other Changes
- chore(deps): update dependency nx to ^21.4.0 by @renovate[bot] in #5858
- test: fix flaky watch files case by @chenjiahan in #5860
- test(e2e): fix flaky build watch case by @chenjiahan in #5861
- test(e2e): improve log pattern matching in test utils by @chenjiahan in #5863
- test(e2e): fix flaky CLI shortcuts cases by @chenjiahan in #5864
- test(e2e): simplify profile test cases by using helpers by @chenjiahan in #5865
- chore(deps): update all patch dependencies by @renovate[bot] in #5866
- test: fix flaky watch-files-array e2e test case by @chenjiahan in #5867
- test(e2e): reorganize test helpers into separate modules by @chenjiahan in #5868
- test(e2e): standardize log assertions and improving reliability by @chenjiahan in #5869
- test(e2e): fix flaky plugin hook tests by @chenjiahan in #5870
- test(e2e): add test case for using declaration syntax by @chenjiahan in #5873
- test(e2e): simplify runtime log assertions by @chenjiahan in #5874
- test(cli): fix flaky build watch options test by @chenjiahan in #5875
- test(e2e): add helper to assert no logs by @chenjiahan in #5877
- test(e2e): improve lazy compilation cases by @chenjiahan in #5878
- release: 1.5.0-beta.4 by @chenjiahan in #5885
Full Changelog: v1.5.0-beta.3...v1.5.0-beta.4
v1.5.0-beta.3
What's Changed
New Features π
- feat(client): improve log messages for overlay and socket by @chenjiahan in #5849
Bug Fixes π
- fix: failed to create multiple HMR connections by @chenjiahan in #5844
- fix(server): handle Deno compatibility in public dir copy by @chenjiahan in #5852
- fix: do not allow to disable filename hash of Wasm files by @chenjiahan in #5854
Refactor π¨
- refactor: rename connection to socket for clarity by @chenjiahan in #5850
Document π
- docs: Add missing backtick to filename.mdx by @schu34 in #5848
- docs(config): add links to chunk splitting strategies by @chenjiahan in #5845
Other Changes
- chore: update biome to v2.2.0 and adjust configuration by @chenjiahan in #5851
- chore(deps): update @rstest/core to v0.2.1 by @chenjiahan in #5853
- release: 1.5.0-beta.3 by @chenjiahan in #5855
New Contributors
Full Changelog: v1.5.0-beta.2...v1.5.0-beta.3
v1.5.0-beta.2
Highlights π‘
Barrel file optimization
Rspack's experimental barrel file optimization has been enabled by default.
When building applications with barrel files, this optimization should make builds significantly faster.
# Without barrel optimization
Benchmark 1: node --run build:rsbuild
Time (mean Β± Ο): 1.708 s Β± 0.040 s [User: 4.624 s, System: 2.005 s]
Range (min β¦ max): 1.655 s β¦ 1.757 s 5 runs
# With barrel optimization
Benchmark 2: BARREL=true node --run build:rsbuild
Time (mean Β± Ο): 1.253 s Β± 0.007 s [User: 3.179 s, System: 1.292 s]
Range (min β¦ max): 1.240 s β¦ 1.258 s 5 runs
Summary
BARREL=true node --run build:rsbuild ran
1.36 Β± 0.03 times faster than node --run build:rsbuildThis optimization can be disabled via experiments.lazyBarrel:
// rsbuild.config.mjs
export default {
tools: {
rspack: {
experiments: {
lazyBarrel: false,
},
},
},
};What's Changed
Performance π
- perf: enable Rspack's barrel file optimization by default by @chenjiahan in #5840
- perf: enable Rspack's inline enum optimization by @chenjiahan in #5841
Bug Fixes π
- fix(cache): handle fs operations errors by @chenjiahan in #5839
- fix(types): loosen plugin apply type to support older versions by @chenjiahan in #5842
Document π
- docs(lazy-compilation): update default value and version history by @chenjiahan in #5837
Other Changes
- chore: enable no-unsafe-enum-comparison lint rule by @chenjiahan in #5833
- chore(deps): update actions/checkout action to v5 by @renovate[bot] in #5834
- chore(deps): update all patch dependencies by @renovate[bot] in #5835
- chore(deps): update dependency @rslib/core to v0.12.0 by @renovate[bot] in #5836
- release: 1.5.0-beta.2 by @chenjiahan in #5843
Full Changelog: v1.5.0-beta.1...v1.5.0-beta.2
v1.5.0-beta.1
Highlights π‘
Lazy compilation by default π
Rsbuild now enables lazy compilation for dynamic imports by default (dev.lazyCompilation.imports is now set to true for web target). If your application contains many dynamic imports, you'll notice faster dev server startup.
If you encounter any issues related to lazy compilation, you can disable it by setting dev.lazyCompilation to false , or feel free to report them via GitHub Issues.
What's Changed
New Features π
- feat: add experimental ESM output support for node target by @chenjiahan in #5823
- feat: enable lazyCompilation.imports by default by @GiveMe-A-Name in #5824
Bug Fixes π
- fix(server): adjust indentation in debug log message by @chenjiahan in #5826
- fix(hmr): remove redundant condition check by @chenjiahan in #5828
- fix: update lazyCompilation config to fix deprecation warning by @chenjiahan in #5829
Document π
- docs: mention Rspack's default split chunks strategy by @chenjiahan in #5821
Other Changes
- chore: update externals in Rslib config for postcss-load-config by @chenjiahan in #5822
- release: 1.5.0-beta.1 by @chenjiahan in #5832
Full Changelog: v1.5.0-beta.0...v1.5.0-beta.1
v1.5.0-beta.0
Highlights π‘
Drop support for Node 16
Node.js 16 reached its end-of-life on September 11, 2023. Many other npm packages in the ecosystem have also dropped support for Node 16, including webpack-dev-server, css-loader, sass-loader, and so on, which makes maintaining compatibility increasingly challenging. Therefore, we have decided to drop Node 16 support starting from Rsbuild v1.5 to ensure better compatibility with the modern ecosystem.
| Package | v1.4 | v1.5 |
|---|---|---|
| @rspack/core | >=16.0.0 | >=18.12.0 |
| @rspack/cli | >=18.12.0 | >=18.12.0 |
| @rspack/dev-server | >=18.12.0 | >=18.12.0 |
| @rsbuild/core | >=16.10.0 | >=18.12.0 |
β οΈ This is a breaking change for users still running Node.js 16. Users will need to upgrade to Node.js 18.12.0 or later to use Rsbuild v1.5.
For users currently using Node.js 16:
- Upgrade to Node.js 18.12.0 or later (Node.js 22 LTS is recommended)
- Update your CI/CD pipelines to use the new Node.js version
Parallel Less Compilation
This release adds support for parallel loader execution to @rsbuild/plugin-less. If your project uses the @rsbuild/plugin-less and contains a large number of Less files, you can enable parallel compilation to improve build performance.
pluginLess({
parallel: true,
});What's Changed
New Features π
- feat!: update minimum Node.js version to 18.12.0 by @chenjiahan in #5786
- feat: add
onBeforeDevCompileplugin hook by @9aoy in #5788 - feat: improve command descriptions and documentations by @chenjiahan in #5792
- feat(plugin-less): support for parallel loader execution by @chenjiahan in #5805
- feat: allow to custom Wasm filename hash by @chenjiahan in #5807
- feat(deps): update @rspack/core to v1.5.0-beta.0 by @chenjiahan in #5818
Performance π
- perf: update build configs to target ES2022 by @chenjiahan in #5790
- perf: remove pre-bundling of postcss-load-config by @chenjiahan in #5808
Bug Fixes π
- fix(cli): ensure consistent spacing for npx of node 20+ by @chenjiahan in #5791
- fix(cli): skip greeting when help is requested by @chenjiahan in #5794
- fix(cli): ensure consistent spacing for node run script by @chenjiahan in #5813
Refactor π¨
- refactor: eliminate switch exhaustiveness checks by @chenjiahan in #5803
Document π
- docs: update JavaScript runtime installation instructions by @chenjiahan in #5787
- docs: add less parallel to build performance guide by @chenjiahan in #5809
- docs: add version info to onBeforeDevCompile hook by @chenjiahan in #5811
- docs: improve code splitting documentation clarity by @chenjiahan in #5816
Other Changes
- test(e2e): replace execSync and npx with a faster helper by @chenjiahan in #5783
- test(e2e): replace direct exec calls with faster helper by @chenjiahan in #5784
- chore: replace npx with pnpx in bump scripts by @chenjiahan in #5785
- chore: remove node 16 compatibility patches and comments by @chenjiahan in #5789
- chore(deps): update dependency @rsdoctor/rspack-plugin to v1.2.0 by @renovate[bot] in #5793
- chore: exclude additional directories from biome by @chenjiahan in #5795
- chore(deps): update @rslint/core to v0.1.7 by @chenjiahan in #5797
- chore(deps): update dependency svelte to ^5.38.0 by @renovate[bot] in #5801
- chore(deps): update dependency rsbuild-plugin-open-graph to ^1.1.0 by @renovate[bot] in #5800
- chore(deps): update dependency react-router-dom to ^7.8.0 by @renovate[bot] in #5799
- chore: remove unnecessary type assertions by @chenjiahan in #5802
- release: @rsbuild/plugin-less v1.4.0 by @chenjiahan in #5806
- chore(deps): update all patch dependencies by @renovate[bot] in #5810
- chore: integrate with
rsbuild-plugin-arethetypeswrongby @colinaaa in #5812 - test(e2e): fix flaky watching file cases by @chenjiahan in #5815
- release: 1.5.0-beta.0 by @chenjiahan in #5819
Full Changelog: v1.4.15...v1.5.0-beta.0