Releases: web-infra-dev/rspack
v1.1.0-beta.0
Highlight
New experiments.incremental
We are implementing a new incremental rebuild architecture that makes the HMR much faster. It's an experimental feature in v1.1 and we still have more work to do before we stabilize it, but for now we have implemented parts of it and seen significant performance boosts.
In a case of 10000 React components, the HMR becomes 38% faster:
Tip
Checkout our docs for more details, and it's still in early stage but we hope you can try it out and provide us with some bugs and feedback at #8106.
Faster output.hashFunction
Rspack's output.hashFunction now defaults to the faster xxhash64
, and the output.hashDigestLength now defaults to 16
(prev 20
).
In the very large projects, this change will bring a significant performance improvement:
hyperfine --warmup 1 --runs 3 'HASH_FUNCTION=md4 node --run build:rspack' 'HASH_FUNCTION=xxhash64 node --run build:rspack'
Benchmark 1: HASH_FUNCTION=md4 node --run build:rspack
Time (mean Β± Ο): 11.428 s Β± 0.758 s [User: 83.504 s, System: 5.808 s]
Range (min β¦ max): 10.892 s β¦ 12.295 s 3 runs
Benchmark 2: HASH_FUNCTION=xxhash64 node --run build:rspack
Time (mean Β± Ο): 9.697 s Β± 0.318 s [User: 79.664 s, System: 6.127 s]
Range (min β¦ max): 9.374 s β¦ 10.009 s 3 runs
Summary
HASH_FUNCTION=xxhash64 node --run build:rspack ran
1.18 Β± 0.09 times faster than HASH_FUNCTION=md4 node --run build:rspack
Related PR: #8249
What's Changed
Performance Improvements β‘
- perf: incremental build chunk graph by @JSerFeng in #7721
- perf: enable
xxhash64
hash function by default by @chenjiahan in #8249 - perf: enable SWC
disableAllLints
by default to reduce overhead by @chenjiahan in #8275 - perf(core): replace
neo-async
with a minimal helper by @chenjiahan in #8282
Exciting New Features π
- feat: add setters for errors and warnings in Compilation by @inottn in #8115
- feat(CLI): make
@rspack/cli
dual package and bundle with Rslib by @chenjiahan in #8187 - feat: add rspack_cacheable lib by @jerrykingxyz in #8156
- feat: keep SWC types up to date by @chenjiahan in #8215
- feat: support wrappedContextRegExp by @inottn in #8149
- feat: introduce RemoveDuplicateModulesPlugin by @JSerFeng in #8128
- feat(html): support function filename and
[name]
in filename by @LingyuCoder in #7753 - feat: module.modules by @SyMind in #8192
- feat: support
output.compareBeforeEmit
by @LingyuCoder in #8245 - feat(incremental): free space for revoked modules by @ahabhgk in #8250
- feat(core): bump swc to 3.0.1 by @hardfist in #8264
- feat: add read API to output file system by @LingyuCoder in #8274
Bug Fixes π
- fix: temporarily use
lightingcss_rs
to fix CSS property order by @GiveMe-A-Name in #8182 - fix(deps): upgrade rspack_resolver 0.3.5 to fix extensionAlias edge cases by @SoonIter in #8188
- fix: should correct cacheGroups test regex by @JSerFeng in #8204
- fix(type):
rspack
function type in cjs require by @SoonIter in #8169 - fix(modern-module): concatenate entry module regardless bail reasons by @fi3ework in #8165
- fix(ci): trigger
pkg-preview
when the needs are skipped by @shulaoda in #8216 - fix: incremental provided exports should rebuild clean exports info by @ahabhgk in #8221
- fix: module_executor support layer by @jerrykingxyz in #8212
- fix: expose incremental.buildChunkGraph by @JSerFeng in #8240
- fix: compile time evaluation of require.ensure by @LingyuCoder in #8242
- fix(cli): display the error which is thrown by the plugin during the starting of
rspack serve
by @LingyuCoder in #8244 - fix: preserve star export from external module by @fi3ework in #8217
- fix: sourceMapFilename is relative by @SyMind in #8269
- fix(type): Make iterators compatible with TS 5.6
--target ESNext
by @andersk in #8279
Document Updates π
- docs: update ContextModuleFactory hook by @9aoy in #8178
- docs: correct ES modules and some other spellings by @chenjiahan in #8191
- docs: add tips and examples for experiments configs by @chenjiahan in #8189
- docs: use ApiMeta specific label instead of Webpack specific chapter by @9aoy in #8186
- docs: update links in README by @chenjiahan in #8203
- docs: add layer examples and correct types by @chenjiahan in #8202
- docs: fix link is 404 in Guide by @nobuaki0331 in #8223
- docs: correct the format of defaultValue by @inottn in #8222
- docs: should enable swc
keepImportAttributes
configuration when useRule.with
by @9aoy in #8239 - docs: addedVersion should link to release tag by @9aoy in #8241
- docs: update Rspack roadmap by @chenjiahan in #8246
- docs: add license to website footer by @chenjiahan in #8261
- docs(swc-loader): add example for syntax lowering and polyfill by @chenjiahan in #8265
Other Changes
- refactor: add JSDoc to improve config.experiments types by @GiveMe-A-Name in #8184
- test: rename harmony to ESM by @chenjiahan in #8183
- chore(deps): update crates by @renovate in #6596
- chore(deps): update dependency exit-hook to v4 by @renovate in #8193
- chore(deps): update pnpm to v9.12.2 by @renovate in #8199
- refactor: collect rebuild modules mutations in make by @ahabhgk in #8196
- refactor: add JSDoc to improve config.wath types by @GiveMe-A-Name in #8201
- test: add
rspack.default
should not exist test by @SoonIter in #8207 - chore(typo): rename
lightningCssMiminizerPlugin.ts
file by @SoonIter in #8214 - refactor: add JSDoc to improve config.devServer type by @GiveMe-A-Name in #8213
- refactor: add JSDoc to improve config.ignoreWarnings, profile, bail types by @GiveMe-A-Name in #8230
- chore(deps): update npm dependencies by @renovate in #8200
- refactor: add JSDoc to improve config.performance by @GiveMe-A-Name in #8231
- refactor: add JSDoc to improve rspack config types by @GiveMe-A-Name in #8233
- ci: allow to use self-host runner when preview package by @LingyuCoder in #8236
- ci: allow to get label from self host runner by @LingyuCoder in #8237
- chore: add Debug trait for FileSystem and Make Task by @jerrykingxyz in #8252
- ci: allow aarch64 gnu compile on github runner in pkg preview by @LingyuCoder in #8253
- test: remove copy plugin build folder by @LingyuCoder in #8251
- ci: create prerelease pull request by @LingyuCoder in #8263
- ci: fix pretag default value by @LingyuCoder in #8266
- chore(deps): update pnpm to v9.12.3 by @renovate in #8256
- chore(deps): update github-actions by @renovate in #8255
- chore: remove arco-pro diff test case by @chenjiahan in...
v1.0.14
What's Changed
Performance Improvements β‘
- perf: cache swc loader by @CPunisher in #7965
Exciting New Features π
- feat: incremental for collecting dependencies diagnostics by @ahabhgk in #8127
- feat: rename harmony in comments to ESM by @chenjiahan in #8162
- feat: support
require.ensure
by @CPunisher in #7972 - feat(types): export
ResolveData
type by @9aoy in #8177
Bug Fixes π
- fix: perf degradation in devtool plugin by @SyMind in #8147
- fix: compatible static methods with html-webpack-plugin 5.6.0 by @LingyuCoder in #8157
- fix: generate correct worker expression with trusted types by @LingyuCoder in #8143
- fix: use content hash as [base] and [name] for extracted DataURIs by @inottn in #8148
- fix: should keep comments of esm export by @LingyuCoder in #8168
- fix: escape node.__dirname by @inottn in #8172
Document Updates π
- docs: disable doc blog sidebar by @ahabhgk in #8155
- docs: add
html-rspack-tags-plugin
as an alternative by @LingyuCoder in #8158 - docs: add Kuaishou logo to who is using by @chenjiahan in #8160
- docs: rename shareScope to shareStrategy by @86XIng in #8173
Other Changes
- chore(deps): update typescript to v5.6 by @SoonIter in #8145
- test: add global snapshot serializer by @LingyuCoder in #8137
- chore(docs): rsdoctor add the note for CssExtractRspackPlugin by @easy1090 in #8087
- refactor: mutations read write permission from incremental options by @ahabhgk in #8159
- refactor: add JSDoc to improve config.target, devtool, node, cache types. by @GiveMe-A-Name in #8152
- refactor: rename harmony in Rust code to ESM by @chenjiahan in #8166
- refactor: add JSDoc to improve config.stats types by @GiveMe-A-Name in #8174
- refactor: incremental options name by @ahabhgk in #8175
New Contributors
Full Changelog: v1.0.13...v1.0.14
v1.0.13
What's Changed
Bug Fixes π
Document Updates π
Other Changes
- refactor: add JSDoc for configuration.module by @GiveMe-A-Name in #8142
- chore(deps): update cargo-bins/cargo-binstall action to v1.10.8 by @renovate in #8131
Full Changelog: v1.0.12...v1.0.13
v1.0.12
What's Changed
Exciting New Features π
- feat(cli): add exports field by @chenjiahan in #8119
- feat(rspack_core): use simple string parsing instead of regex by @shulaoda in #8113
Bug Fixes π
- fix: side effects optimize for dynamic reexports by @ahabhgk in #8125
- fix(json): only add RuntimeGlobals::MODULE for concatenation by @fi3ework in #8126
- fix: should not panic when passing
test
option to SourceMapDevToolPlugin by @inottn in #8136 - fix(core): should external package.json from bundle by @chenjiahan in #8140
Other Changes
- chore(workflow): merge website folder to the root pnpm workspace by @chenjiahan in #8114
- chore: upgrade rust to 1.81.0 nightly by @jerrykingxyz in #8111
- chore(create-rspack): bump Rslib 0.0.12 and adjust dirname by @chenjiahan in #8124
- test: not to display obsoleted snapshots when test with
-t
by @LingyuCoder in #8122 - chore(deps): update npm dependencies by @renovate in #8133
Full Changelog: v1.0.11...v1.0.12
v1.0.11
Highlights π‘
Faster Startup π
The Node.js code from @rspack/core
is now bundled into a single bundle, making Rspack startup 30ms faster.
Benchmark 1 (Rspack 1.0.10)
Time (mean Β± Ο): 370.5 ms Β± 12.1 ms [User: 412.9 ms, System: 68.1 ms]
Range (min β¦ max): 357.9 ms β¦ 395.1 ms 10 runs
Benchmark 2 (Rspack 1.0.11)
Time (mean Β± Ο): 335.4 ms Β± 2.6 ms [User: 380.3 ms, System: 59.0 ms]
Range (min β¦ max): 331.8 ms β¦ 339.1 ms 10 runs
What's Changed
Performance Improvements β‘
- perf: bundle
@rspack/core
for faster startup by @chenjiahan in #8072 - perf(rspack_core): replace
HASH_PLACEHOLDER_REGEX
with simple string parsing by @shulaoda in #7907 - perf: add cache for getting sideEffectState by @JSerFeng in #8070
Exciting New Features π
- feat(core): bump swc to 1.0.0 by @hardfist in #8104
- feat(rspack_plugin_copy): Set source_filename and copied flag when copying an asset by @ramon-villain in #8077
Bug Fixes π
- fix: avoid renaming the export name when outputting a library by @inottn in #8046
- fix(ci/preview-commit): remove predicate-quantifier by @shulaoda in #8091
- fix: return url in CreateScriptUrlRuntimeModule by @LingyuCoder in #8088
- fix: css module should not calculate id by @JSerFeng in #8084
- fix: avoid extra runtime for get javascript chunk filename by @inottn in #8099
- fix: generate code correctly for dynamically importing the same file by @inottn in #8100
Other Changes
- test: disable unstable test case of rspack-cli by @LingyuCoder in #8086
- chore: polish CSS HMR logs and correct the case by @chenjiahan in #8083
- chore(deps): update npm dependencies by @renovate in #7976
- refactor: remove connection id by @jerrykingxyz in #8089
- test(plugin-test): support for reference Rspack source modules by @chenjiahan in #8105
- refactor: add JSDoc & types to improve Rspack configuration.output types. by @GiveMe-A-Name in #8107
- chore(website/deps): bump Rspress 1.33.1 by @SoonIter in #8112
New Contributors
- @ramon-villain made their first contribution in #8077
Full Changelog: v1.0.10...v1.0.11
v1.0.10
What's Changed
Highlights
The swc_core
crate has been upgraded from version 0.106.1
to 0.109.1
. Fixed the source map error in SWC minifier when used with Sentry.
For a detailed comparison between swc versions, see the https://github.com/swc-project/swc/compare/swc_core@v0.106.1...swc_core@v0.109.1.
Exciting New Features π
- feat: support dependencies in resolve hook callback by @SyMind in #7949
- feat(rspack_plugin_schemas): http import schema plugin by @ScriptedAlchemy in #7008
Bug Fixes π
- fix: the value of this.sourceMap in LoaderContext is incorrect when using SourceMapDevToolPlugin by @inottn in #7968
- fix: source map is not works with Sentry by @SyMind in #8080
- fix: should support
chunk.contentHash
in PathData ofcompilation.getPath
by @LingyuCoder in #8074 - fix: allow file names and directory names to contain brackets by @inottn in #8069
Other Changes
- refactor: add JSDoc to improve Rspack configuration.optimization types. by @GiveMe-A-Name in #8081
- chore(deps): update pnpm to v9.12.1 by @renovate in #8065
Full Changelog: v1.0.9...v1.0.10
v1.0.9
What's Changed
Exciting New Features π
Bug Fixes π
- fix(externals): distinguish "module" and "import" in "module-import" by @fi3ework in #7999
- fix: should set code generation hash to concatenated module by @LingyuCoder in #8062
- fix: should use chunk in path data of
compilation.getPath
by @LingyuCoder in #8032 - fix(type): be compitable to ts5.6 by @SoonIter in #8071
Document Updates π
- docs: upgrade breaking change description by @hardfist in #8012
- docs(progress-plugin): support custom handler by @9aoy in #8014
Other Changes
- chore: drop npm-run-all, make command npm client agnostic by @fi3ework in #8005
- chore: update teams.yml by @chenjiahan in #8020
- chore(ci): support pkg.pr.new by @shulaoda in #7757
- chore(deps): update dependency style-loader to v4 by @renovate in #8025
- chore(ci): skip preview if no relevant code changes by @shulaoda in #8023
- refactor: add JSDoc & types to improve configuration.resolve types. by @GiveMe-A-Name in #8029
- test: try to fix the randomly failed of @rspack/cli test cases by @LingyuCoder in #8030
- refactor: add JSDoc to improve configuration.externals types by @GiveMe-A-Name in #8013
- chore(deps): update crate-ci/typos action to v1.25.0 by @renovate in #8036
- chore(deps): update dependency coffee-loader to v5 by @renovate in #8047
- chore(website): remove unused dependencies by @renovate in #8048
- chore(deps): update cargo-bins/cargo-binstall action to v1.10.7 by @renovate in #8052
- chore(deps): update dependency jsdom to v25 by @renovate in #8053
- chore(deps): update pnpm to v9.12.0 by @renovate in #8054
- refactor: add JSDoc to improve Rspack configuration.entry|context|mode types by @GiveMe-A-Name in #8016
- chore(deps): update playwright to 1.47.0 by @SoonIter in #8063
- chore(deps): update crate-ci/typos action to v1.26.0 by @renovate in #8066
Full Changelog: v1.0.8...v1.0.9
v1.0.8
What's Changed
Highlights
- the Rust crate
swc_core
has been upgraded to 0.106.0 and swc minifier source map error has been fixed by @SyMind in #7991
Performance Improvements β‘
- perf: lazy create hash utils by @chenjiahan in #7961
Exciting New Features π
- feat: support
compilation.builtModules
by @LingyuCoder in #7984
Bug Fixes π
- fix: the progress values for the make and sealing statuses are inaccurate by @inottn in #7990
- fix: correctly display the progress bar when it reaches 100% by @inottn in #7989
- fix: use
HookMap
forruntimeRequirementInTree
by @colinaaa in #7987 - fix: swc minifier source map by @SyMind in #7991
- fix: generate params of runtime module by @LingyuCoder in #8000
- fix(modern-module): use module style export for non entry module by @fi3ework in #7996
- fix: dedup asset_contents to avoid multiple hash changes by @inottn in #8002
- fix(core): allow non-utf8 string in source code by @hardfist in #8009
Document Updates π
- docs: update team members, add @shulaoda by @chenjiahan in #7998
Other Changes
- refactor(core): add task name for tokio-console better display by @hardfist in #7966
- refactor(core): use separate tokio_console layer by @hardfist in #7982
- chore(deps): update dependency @swc/plugin-remove-console to v3 by @renovate in #7978
- chore(deps): update pnpm to v9.11.0 by @renovate in #7977
- chore(deps): update github-actions by @renovate in #7973
- chore: fix proxied typo by @chenjiahan in #7983
- refactor: import module hooks by @JSerFeng in #7967
- revert: refactor(core) add task name for tokio-console better display by @LingyuCoder in #7997
- refactor: add JSDoc to improve BannerPlugin options types by @GiveMe-A-Name in #8003
- refactor: add JSDoc & types to improve HtmlRspackPlugin, IgnorePlugin options types by @GiveMe-A-Name in #8004
Full Changelog: v1.0.7...v1.0.8
v1.0.7
What's Changed
Performance Improvements β‘
- perf: lazy require
browserslist
package by @chenjiahan in #7963
Bug Fixes π
- fix(core): ping @rspack/dev-server to 1.0.5 by @hardfist in #7969
- fix(create-rspack): missing vanilla-ts tsconfig.json by @chenjiahan in #7970
Document Updates π
- docs: addRuntimeModule and runtimeRequirementInTree by @LingyuCoder in #7938
Other Changes
- refactor: phases level switcher for incremental options by @ahabhgk in #7954
- refactor: remove mut options in plugin apply by @ahabhgk in #7958
- chore: migrate @rspack/dev-server to an independent repo by @LingyuCoder in #7959
- chore: not allow run typecheck when run node bin/rspack for other project by @hardfist in #7964
Full Changelog: v1.0.6...v1.0.7
v1.0.6
What's Changed
Caution
This version has a bug which requires install webpack together to work, use v1.0.7 instead
Highlights
Support ContextReplacementPlugin
For more information, please refer to the documentation ContextReplacementPlugin.
Performance Improvements β‘
Exciting New Features π
- feat(rspack_plugin_javascript): improve provide dependency by @shulaoda in #7871
- feat(progress-plugin): support custom handler by @LingyuCoder in #7896
- feat: allow ModuleFactoryCreateData modify dependencies by @jerrykingxyz in #7895
- feat: support
compilation.hooks.runtimeRequirementInTree
by @LingyuCoder in #7917 - feat: support experimental loader
emitDiagnostic
by @h-a-n-a in #7879 - feat: support
compilation.addRuntimeModule
by @LingyuCoder in #7925 - feat: context repl plugin by @SyMind in #7853
- feat(core): integrate rspack_resolver with input_filesystem by @hardfist in #7858
- feat(core): support using tokio-console by @hardfist in #7945
Bug Fixes π
- fix(rspack-test-tools): corret script
testu
by @shulaoda in #7894 - fix: should run watch cases test in build assets by @ahabhgk in #7897
- fix(core): use resource shouldn't contain query by @hardfist in #7911
- fix: preserve variable names declared with
var
by @inottn in #7903 - fix: use SourceMapSource in js side to support map method by @SyMind in #7828
- fix: avoid import external module re-assigin in concatenation by @fi3ework in #7839
- fix: make stage has_module_graph_change calculate incorrectly by @jerrykingxyz in #7920
- fix(core): align assetInfo with webpack by @hardfist in #7924
- fix: should create an empty codegen result for module that has failure in codegen by @JSerFeng in #7777
- fix: eco-ci prebundled enhanced-resolve by @SoonIter in #7933
- fix: attach when add runtime module by @LingyuCoder in #7935
- fix: infer async modules when incremental enabled by @ahabhgk in #7927
- fix: change javascript parser options to properly merge by @inottn in #7946
Document Updates π
- docs(landingpage): update @rstack-dev/doc-ui to 1.5.1 by @SoonIter in #7899
- docs: update node version and webpack-dev-server@5 by @SoonIter in #7900
- docs: update how to use swc plugin in rspack rule by @zhangmingyuan666 in #7904
- docs: add Trellis logo at who is using rspack by @yharaskrik in #7901
- docs(landingpage): update @rstack-dev/doc-ui by @SoonIter in #7909
- docs: update who is using by @chenjiahan in #7948
- docs: fix link is 404 in README by @lzxb in #7947
- docs: add use case for
extensionAlias
by @chenjiahan in #7951 - docs(website): update blog credit by @ScriptedAlchemy in #7931
- docs: webpack-merge also applies to rspack by @wjw99830 in #7953
Other Changes
- refactor(types): remove @ts-expect-error in loaderRunner and StatsFactory by @SoonIter in #7864
- refactor: clean dev server code by @LingyuCoder in #7794
- chore(rspack): remove unnecessary files by @shulaoda in #7910
- chore(deps): bump mio from 0.8.8 to 0.8.11 by @dependabot in #7928
- test: disable dev server e2e test by @LingyuCoder in #7929
- chore(infra/biome): enable no-errors-on-unmatched by @CPunisher in #7932
- refactor: use
realDependencyLocation
instead ofrange
in dependency by @shulaoda in #7892 - chore(workflow): remove rangeStrategy from renovate config by @chenjiahan in #7950
- test: fix css concat stats test by @ahabhgk in #7955
New Contributors
- @zhangmingyuan666 made their first contribution in #7904
- @yharaskrik made their first contribution in #7901
- @lzxb made their first contribution in #7947
- @wjw99830 made their first contribution in #7953
Full Changelog: v1.0.5...v1.0.6