Releases: web-infra-dev/rspack
v1.0.0-beta.5
Highlights
Improved HtmlRspackPlugin
rspack.HtmlRspackPlugin
has a lot of improvements to be more in line with the html-webpack-plugin
.
- [Feat] Support
hash
to append compilation hash - [Feat] Support
base
to inject base tag - [Feat] Support
scriptLoading=systemjs-module
- [Feat] Support
[templatehash]
in filename template, same as[contenthash]
- [Breaking] Rename
excludedChunks
toexcludeChunks
, aligned with html-webpack-plugin - [Breaking] Minify html by default when
mode=production
- [Fix] No doctype parsing error
- [Fix] Win32 relateive path
- [Fix] Relative favicon path
- [Fix] Wrong
&
escaping inscript.src
andlink.href
- [Test] Passed html-webpack-plugin basic cases from 45 to 85
PR: #7577
Removed SwcCssMinimizerRspackPlugin
The rspack.SwcCssMinimizerRspackPlugin
has been removed to reduce binary size, please use LightningCssMinimizerRspackPlugin instead:
module.exports = {
optimization: {
minimizer: [
- new rspack.SwcCssMinimizerRspackPlugin({
+ new rspack.LightningCssMinimizerRspackPlugin({
// options
}),
],
},
};
Rspack also supports using css-minimizer-webpack-plugin.
What's Changed
Breaking Changes π
- feat!: improve HtmlRspackPlugin by @LingyuCoder in #7577
- refactor!: disable css minify in html minify and remove SwcCssMinimizerRspackPlugin by @ahabhgk in #7547
Performance Improvements β‘
Exciting New Features π
- feat: second param for loader hook by @SyMind in #7537
- feat(create-rspack): configure Lightning CSS targets by default by @chenjiahan in #7579
- feat(core): don't inject bundlerInfo in library mode by @hardfist in #7567
- feat: extract-css-plugin supports layer by @JSerFeng in #7583
Bug Fixes π
- fix: use intersection runtime for concat module code gen by @ahabhgk in #7523
- fix: chunk hash unstable by @JSerFeng in #7534
- fix: should insert semi after import, export, debugger and class field by @CPunisher in #7529
- fix: check SuperProp in walk_call_expression by @CPunisher in #7530
- fix: remove useless "module" external runtime by @fi3ework in #7533
- fix(rust-core): no need to pass resolve_factory when using rust api by @hardfist in #7539
- fix(cli): wrong entry defaults from cli by @xc2 in #7541
- fix: source map plugin module should enable by default by @ahabhgk in #7545
- fix: avoid inner graph top level symbol for nested webpack_require by @ahabhgk in #7584
Document Updates π
- docs: correct property type style and filename by @chenjiahan in #7520
- docs: add overview flow chart for compiler hooks by @LingyuCoder in #7524
- docs: update benchmark data by @chenjiahan in #7548
- docs: correct LightningCssMinimizerRspackPlugin link by @JSerFeng in #7551
- docs: update chunk type by @h-a-n-a in #7552
- docs: list top50 plugins compatibility by @9aoy in #7554
- docs(module-federation): optimize module federation version selection by @zhoushaw in #7558
- docs: add overview flow chart for compilation hooks by @LingyuCoder in #7555
- docs: remove experiments flags by @hardfist in #7560
- docs: remove examples page by @9aoy in #7561
- docs: update glossary by @hardfist in #7562
- docs: delete benchmark page by @hardfist in #7566
- docs: upgrade Rspress version by @zoolsher in #7581
- docs: rewrite tree-shaking doc by @JSerFeng in #7568
Other Changes
- refactor(typescript): packages/rspack/src/node/NodeWatchFileSystem by @wxiaoyun in #7528
- chore(infra): improve the configuration of
justfile
by @shulaoda in #7526 - chore: polish some words on introduction by @hardfist in #7557
- chore(deps): update cargo-bins/cargo-binstall action to v1.10.2 by @renovate in #7564
- test(plugin): test html plugin with basic cases of html-webpack-plugin by @LingyuCoder in #7571
- chore(deps): bump plugin-react-refresh and lite-tapable to v1.0.0 by @chenjiahan in #7580
- refactor: improve esm harmony dependencies structure by @shulaoda in #7576
- refactor: module hash by @ahabhgk in #7569
Full Changelog: v1.0.0-beta.4...v1.0.0-beta.5
v1.0.0-beta.4
What's Changed
Exciting New Features π
- feat(stats): support
moduleReason.resolvedModule
by @LingyuCoder in #7467 - feat(diagnostic): prettier diagnostics of magic comments by @h-a-n-a in #7472
- feat: support compilation.modules[i].blocks by @SyMind in #7460
- feat: port "module-import" external type by @fi3ework in #7479
- feat(node-stuff): implement
node-module
shim by @fi3ework in #7465 - feat(stats): support
isOverSizeLimit
in stats by @LingyuCoder in #7483 - feat: splitChunks support usedExports by @JSerFeng in #7485
- feat: support
stats.chunkGroup[].childAssets
by @LingyuCoder in #7517 - feat: support module.size function in cacheGroups.[i].test by @SyMind in #7482
- feat: expose added/removed compilation.*_dependencies to js side by @jerrykingxyz in #7522
Bug Fixes π
- fix: patch asset info in update asset by @ahabhgk in #7464
- fix!: reuseExistingChunk should be false by default by @JSerFeng in #7489
- fix(modern-module): export syntax detect more invalid chars by @fi3ework in #7493
- fix: concatenation should merge moduleβs chunk init fragments by @fi3ework in #7504
- fix(modern-module): correct use bailout reason by @fi3ework in #7513
- fix: maxInitialRequests should exists in cache groups by @JSerFeng in #7512
- fix(hmr): replacement of optionalChain is compatible with legacy versions by @wChenonly in #7510
Document Updates π
- docs: update stats options by @LingyuCoder in #7473
- docs: list plugin compatible +5 by @9aoy in #7481
- docs: add link for Rspack 0.x website by @chenjiahan in #7484
- docs: list compatibility status of more plugins by @9aoy in #7488
- docs: add some missing options by @LingyuCoder in #7480
- docs: fix website error by @hardfist in #7506
- docs: remove deprecated configs by @chenjiahan in #7519
- docs: add MarsCode to online examples by @chenjiahan in #7525
Other Changes
- chore(deps): update cargo-bins/cargo-binstall action to v1.9.0 by @renovate in #7475
- chore(infra/biome): enable noAccumulatingSpread by @shulaoda in #7492
- chore: add description for all crates by @hardfist in #7494
- chore: remove useless swc_core features by @JSerFeng in #7496
- chore(workflow): enable dependency dashboard of renovate by @chenjiahan in #7498
- chore: move non-core packages to rspack-contrib by @LingyuCoder in #7499
- chore: fix missing metadata in publish by @hardfist in #7501
- refactor: remove get presentational dependencies for block by @ahabhgk in #7502
- chore: increase publish limitation by @hardfist in #7515
New Contributors
- @wChenonly made their first contribution in #7510
Full Changelog: v1.0.0-beta.3...v1.0.0-beta.4
v1.0.0-beta.3
What's Changed
Breaking Changes π
SwcJsMinimizerRspackPlugin
Move all SWC options to minimizerOptions
:
- The
compress
option has been moved tominimizerOptions.compress
. - The
mangle
option has been moved tominimizerOptions.mangle
. - The
format
option has been moved tominimizerOptions.format
. - The
module
option has been moved tominimizerOptions.module
.
module.exports = {
optimization: {
minimizer: [
new rspack.SwcJsMinimizerRspackPlugin({
- format: {
- ecma: 6,
- },
+ minimizerOptions: {
+ format: {
+ ecma: 6,
+ },
+ },
}),
],
},
};
LightningCssMinimizerRspackPlugin
- The
browserslist
option has been renamed tominimizerOptions.targets
.
module.exports = {
optimization: {
minimizer: [
new rspack.LightningCssMinimizerRspackPlugin({
- browserslist: 'Chrome >= 53',
+ minimizerOptions: {
+ targets: 'Chrome >= 53',
+ },
}),
],
},
};
PR: #7444
Performance Improvements β‘
- perf: rule matcher allocates only if
resource_path
is not a valid UTF-8 sequence by @h-a-n-a in #7441 - perf: bump lightningcss to remove duplicated browerslist-rs by @chenjiahan in #7461
Exciting New Features π
- feat: support compilation.entries by @SyMind in #7396
- feat: add
compiler.rspack
by @LingyuCoder in #7434 - feat: support seal hook in js side by @SyMind in #7428
- feat(dev-server): export package version by @leimonio in #7305
Bug Fixes π
- fix: add custom browserslist target schema by @CPunisher in #7421
- fix: provided exports for add entry modules by @ahabhgk in #7424
- fix(playground/cases): replace window.onmessage with self.onmessage in worker test case by @shulaoda in #7431
- fix: remove unused JSON schemas for CSS extract plugin by @chenjiahan in #7442
- fix: update deny.toml by @ahabhgk in #7447
- fix: dynamic entry plugin desc to options by @ahabhgk in #7458
- fix: map of empty file should have mappings field by @JSerFeng in #7456
- fix: deep merge module resolve options by @ahabhgk in #7470
- fix: stats typescript wrong by @SyMind in #7466
- fix: type mismatch when using webpack plugins by @chenjiahan in #7455
Document Updates π
- docs: add compiler api by @LingyuCoder in #7423
- docs: update ecosystem links by @chenjiahan in #7435
- docs: add MultiCompiler API by @LingyuCoder in #7436
- docs: add Stats API by @LingyuCoder in #7439
- docs: update dependencies and fix tsconfig paths by @chenjiahan in #7440
- docs: remove duplicated part in document of JavaScript API by @LingyuCoder in #7443
- docs: bump
@rstack-dev/doc-ui
to add Rslib and awesome Rspack by @Timeless0911 in #7445 - docs: add guide for different CSS usages by @chenjiahan in #7446
- docs: remove perf note for mergeDuplicateChunks by @JSerFeng in #7459
- docs: explain usage of inner graph by @JSerFeng in #7462
- docs: add detailed explanation for NormalModuleFactory hooks by @chenjiahan in #7468
- docs: correct some statements of code splitting and splitChunks by @JSerFeng in #7469
Other Changes
- test: enable inner graph and concat modules for runtime condition diff test by @ahabhgk in #7416
- ci: fix git clean wrong by filename too long by @SyMind in #7425
- chore(deps): update dependency sass-loader to v16 by @renovate in #7370
- refactor(type): increase type-coverage by @SoonIter in #7437
- chore(infra/biome): enable noParameterAssign by @shulaoda in #7430
- refactor(typescript): increase typescript type coverage to 100% for rspack-plugin-react-refresh by @shulaoda in #7448
- chore: remove log in mf test by @ahabhgk in #7451
- chore: documentation chores, typo, format, links, etc by @AkatQuas in #7457
- refactor!: redesign minimizer plugin options by @ahabhgk in #7444
Full Changelog: v1.0.0-beta.2...v1.0.0-beta.3
v1.0.0-beta.2
What's Changed
Performance Improvements β‘
Exciting New Features π
- feat: better diagnostic report for harmony residual dependencies by @shulaoda in #7374
- feat: add memory cache of javascript plugins by @LingyuCoder in #7389
- feat: add partial lazyOptions.backend options by @tatchi in #7273
- feat: support
compilation.chunkGroup[].isInitial()
by @LingyuCoder in #7406 - feat(diagnostic): improve diagnostics for swc wasm plugins by @h-a-n-a in #7391
Bug Fixes π
- fix(modern-module): compat with more export cases by @fi3ework in #7394
- fix: other git clean command wrong by @SyMind in #7404
- fix: render filename with dollar sign by @JSerFeng in #7402
- fix: stats perf degradation in hmr by @SyMind in #7407
- fix(mf2): extra provide sharing data by @ahabhgk in #7408
- fix: change some
walk_block_statement
towalk_statement
by @CPunisher in #7410 - fix(rspack_loader_lightningcss): customMedia camelCase option by @SoonIter in #7409
Document Updates π
- docs: update compiler hooks by @LingyuCoder in #7366
- docs: remove outdated builtin config docs by @SyMind in #7372
- docs: add Rsdoctor documents by @easy1090 in #7322
- docs: add doc for html by @SyMind in #7373
- docs: grammar fix by @AkatQuas in #7414
- docs: group api docs by @LingyuCoder in #7415
Other Changes
- refactor(typescript): packages/rspack/src/lib/formatLocation by @wxiaoyun in #7375
- chore(infra/rust-toolchain): upgrade rust 1.80.0 nightly by @SoonIter in #7349
- refactor(typescript): packages/rspack/src/builtin-plugin by @shulaoda in #7378
- refactor(typescript): packages/rspack/src/util/StatsFactory by @wxiaoyun in #7381
- refactor(typescript): packages/rspack/src/logging-truncateArgs by @shulaoda in #7383
- refactor(typescript): packages/rspack/src/util/memoize by @shulaoda in #7376
- refactor(typescript): packages/rspack/src/logging/runtime by @wxiaoyun in #7377
- refactor!: align css runtime by @JSerFeng in #7306
- refactor(typescript): packages/rspack/src/util/webpack by @wxiaoyun in #7388
- chore(infra/biome): enable noUselessTernary by @shulaoda in #7386
- chore(infra/biome): enable noVar by @SoonIter in #7380
- chore(infra/biome): enable noConstEnum by @shulaoda in #7385
- refactor: copiable export info by @ahabhgk in #7390
- refactor(typescript): packages/rspack/src/node/nodeConsole by @wxiaoyun in #7392
- chore(infra/biome): enable noEmptyPattern by @shulaoda in #7384
- ci(infra/typos): fix the styl typos by @SoonIter in #7398
- chore(infra/biome): enable useTemplate by @shulaoda in #7395
- chore(infra/biome): enable more rules by @shulaoda in #7387
- ci: git clean exclude by @SyMind in #7401
- refactor(rust): replace once_cell with std::sync::LazyLock by @SoonIter in #7403
- test: enable more webpack-tests by @JSerFeng in #7411
New Contributors
- @easy1090 made their first contribution in #7322
- @tatchi made their first contribution in #7273
- @AkatQuas made their first contribution in #7414
Full Changelog: v1.0.0-beta.1...v1.0.0-beta.2
v1.0.0-beta.1
Highlights π‘
Import Attributes
Rspack now supports Import Attributes by defaults:
import json from "./foo.json" with { type: "json" };
import("foo.json", { with: { type: "json" } });
PR: #7333
Layers
Rspack now supports module and chunk layers. This feature can be used by frameworks like Rsnext (The Rspack-based Next.js) to implement React Server Components.
- Example: build modern and legacy bundles at the same time:
export default {
entry: {
index: {
import: './src/index.js',
layer: 'modern',
},
'index-legacy': {
import: './src/index.js',
layer: 'legacy',
},
},
module: {
rules: [
{
test: /\.js$/,
issuerLayer: 'modern',
use: [
{
loader: 'builtin:swc-loader',
options: {
env: {
targets: 'Chrome >= 87',
},
},
},
],
},
{
test: /\.js$/,
issuerLayer: 'legacy',
use: [
{
loader: 'builtin:swc-loader',
options: {
env: {
targets: 'ie >= 11',
},
},
},
],
},
],
},
experiments: {
layers: true,
},
};
- Example: Customize rules and resolve options for RSC modules
export default {
module: {
rules: [
// set `layer` for some modules
{
test: /rsc-modules/,
layer: 'rsc',
},
// set resolve options for specified layer
{
issuerLayer: 'rsc',
resolve: {
conditionNames: ['react-server', '...'],
},
},
{
// set loaders for specified layer
oneOf: [
{
issuerLayer: 'rsc',
test: /\.tsx?$/,
use: ['some-rsc-loader'],
},
{
test: /\.tsx?$/,
use: ['some-normal-loader'],
},
],
},
],
},
experiments: {
layers: true,
},
};
PR: #7330
What's Changed
Performance Improvements β‘
- perf: no need to require entire enhanced-resolve by @chenjiahan in #7343
- perf(allocator): use mimalloc v2 for all by @h-a-n-a in #7361
Exciting New Features π
- feat: experiments layers by @ahabhgk in #7330
- feat(css-extract): avoid reloading all CSS when hot load by @shulaoda in #7314
- feat(modern-module): force concaten single module by @fi3ework in #7317
- feat: better diagnostic report for harmony dependency by @shulaoda in #7337
- feat: support
parser.importMeta
andoutput.importMetaName
by @xc2 in #7231
Bug Fixes π
- fix: lightningcss-loader targets array not work as expected by @chenjiahan in #7331
- fix(rspack_plugin_asset): repect user environment config when inlining svg by @SoonIter in #7347
- fix: rspack errors don't support the correct location by @shulaoda in #7328
- fix: add runtime condition for harmony reexport checked by @ahabhgk in #7353
- fix: remove nonsensical intersection types by @colinaaa in #7360
- fix: builtin:lightningcss-loader shuold keep loader query by @JSerFeng in #7363
Document Updates π
- docs(devServer): update webpack-dev-server v5 by @SoonIter in #7319
- docs(blog): correcting the description of decorator configuration in v0.4 by @Mumujianguang in #7320
- docs: add compilation object by @LingyuCoder in #7321
- docs: add
serwist
in community compatibility table by @JoseVSeb in #7345 - docs: include types from common mdx chunks by @LingyuCoder in #7323
- docs: enable prettier for types in website by @Timeless0911 in #7350
- docs: import antd on demand by @Timeless0911 in #7351
- docs: bad symbol in compilation-hooks.mdx by @h-a-n-a in #7352
- docs: improve CssExtractRspackPlugin by @chenjiahan in #7362
- docs: add Logger API by @LingyuCoder in #7365
Other Changes
- chore: add funding page by @hardfist in #7318
- chore(deps): crates update by @SoonIter in #7342
- refactor(typescript): packages/rspack/src/lib from js to ts and esm by @shulaoda in #7289
- chore(infra/biome): switch the biome.jsonc to "off" by @SoonIter in #7357
- refactor: remove module graph accessor by @ahabhgk in #7368
- chore(webpack-test): remove unnecessary snapshots by @shulaoda in #7329
New Contributors
- @Mumujianguang made their first contribution in #7320
- @JoseVSeb made their first contribution in #7345
Full Changelog: v1.0.0-beta.0...v1.0.0-beta.1
v1.0.0-beta.0
Performance Improvements β‘
In version 1.0.0-beta.0 we have made a number of performance optimizations, which together add up to significant performance gains. According to benchmark data, Rspack's dev startup is 4.7% faster, and its prod build is 11% faster.
Detailed changes:
- perf: reduce allocation for
Stats
by @h-a-n-a in #7124 - perf: reduce allocation for parsing by @h-a-n-a in #7219
- perf: use Set as Queue to solve the duplication by @JSerFeng in #7233
- perf: reduce allocation for
ModuleRule
matching by @h-a-n-a in #7249 - perf: reduce large pre-allocations for
JavascriptParser::new
by @h-a-n-a in #7286 - perf: faster hasher for
Ukey
s by @ahabhgk in #7287 - perf: a bunch of small improvement for ConcatenatedModule by @CPunisher in #7257
- perf: reduce allocation for adding dependencies by @h-a-n-a in #7301
Breaking Changes π
Upgraded to latest SWC
@rspack/core
now depends on swc_core
v0.99 (previously v0.96).
If your project is using the SWC Wasm plugin, this will be a breaking change, and you will need to upgrade the SWC Wasm plugin to the latest version.
PR: #7292
Upgraded to webpack-dev-server v5
@rspack/cli
now depends on webpack-dev-server
v5 (previously v4).
If you are using @rspack/cli
, please be aware of the following breaking changes:
- The minimum supported Node.js version of
webpack-dev-server@5
is18.12.0
. - The devServer configuration of Rspack include several breaking changes. Please refer to the webpack-dev-server v5 migration guide for more details.
PR: #7130
Deprecated @rspack/plugin-minify
rspack/plugin-minify
has been deprecated as it was a temporary package to support Terser.
Now Rspack has full support for terser-webpack-plugin
. If you need to use Terser as the minimizer, we recommend using terser-webpack-plugin
instead of @rspack/plugin-minify
:
// rspack.config.js
- const MinifyPlugin = require('@rspack/plugin-minify');
+ const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
optimization: {
minimize: true,
minimizer: [
- new MinifyPlugin({ minifier: 'terser' }),
+ new TerserPlugin(),
],
},
};
PR: #7307
All Changes
Exciting New Features π
- feat: support built-in
lightningcss-loader
by @JSerFeng in #7214 - feat: support tree shaking with awaiting dynamic import by @LingyuCoder in #7230
- feat: support output.charset and output.chunkLoadTimeout by @xc2 in #7189
- feat: support
__webpack_get_script_filename__
by @LingyuCoder in #7203 - feat: support webpack_exports_info by @LingyuCoder in #7205
- feat: external callbacks receive contextInfo.issuer by @fi3ework in #7210
- feat: support destructuring of import.meta by @LingyuCoder in #7229
- feat: align
publicPath
options with webpack by @xc2 in #7216 - feat: support
compilation.chunkGroups
andcompilation.namedChunkGroups
by @LingyuCoder in #7254 - feat(create-rspack): add vanilla templates by @chenjiahan in #7295
- feat: support EntryPlugin filename function by @9aoy in #7297
- feat: support
test
,include
andexclude
options forLightningCssMinimizerRspackPlugin
by @simonxabris in #7290
Bug Fixes π
- fix: panic in ImportMetaContextDependency when resolve failed by @LingyuCoder in #7215
- fix: get correct parent module for root module of concatenated module by @ahabhgk in #7212
- fix: collect auxiliary assets from module by @LingyuCoder in #7222
- fix: fix panic about runtime order by @xc2 in #7240
- fix: real content full hash replacement by @LingyuCoder in #7271
- fix(fs): remove generic in
FileSystem
trait by @hardfist in #7275 - fix(panic): stable runtime key sequence by @LingyuCoder in #7272
- fix: corrects result for
truthy || any
andfalsy && any
by @xc2 in #7277 - fix: Update index.mdx by @lalala-h in #7283
- fix: runtime condition optimization with concate module by @JSerFeng in #7285
- fix: markdown format index.mdx by @lalala-h in #7310
- fix: add
await
to async module export by @CPunisher in #7308 - fix: correct names of hash fields in asset.info by @xc2 in #7220
Document Updates π
- docs: add tool stack to homepage by @chenjiahan in #7221
- docs: add webpack_get_script_filename by @LingyuCoder in #7236
- docs: complete processAssets document by @chenjiahan in #7274
- docs: fix build typo in the benchmark by @chenjiahan in #7300
Other Changes
- refactor: allows minimal/detailed/summary stats presets in configuration by @xc2 in #7186
- chore(deps): add check-dependency-version for devDependencies by @SoonIter in #6323
- refactor: allow passing function type to assets generator.filename by @xc2 in #7206
- chore(deps): unify dependencies with check-depedency-version by @SoonIter in #7208
- test: full enable some webpack stats test cases by @LingyuCoder in #7213
- test: enable webpack test cases of webpackHot.data by @LingyuCoder in #7217
- ci(website/infra): lint-staged issue in website by @SoonIter in #7224
- test: enable preact refresh snapshot test by @LingyuCoder in #7232
- test: enable more available tests by @JSerFeng in #7234
- test: enable inner graph basic webpack test case by @LingyuCoder in #7237
- chore(deps): typescript phantom dependence by @SoonIter in #7235
- ci: speedup free disk space job by @xc2 in #7241
- refactor: change ansiHTML to ts and esm by @wxiaoyun in #7244
- refactor(typescript): refactor
packages/rspack/src/util
from js to ts and esm by @jithyan in #7246 - refactor: remove duplicated extract member expression info by @LingyuCoder in #7248
- chore(deps): update zod to ^3.23.8 by @colinaaa in #7253
- test: add test case for runtime condition by @LingyuCoder in #7250
- refactor(typescript):
packages/rspack/src/config
from js to ts/esm by @jithyan in #7255 - refactor(typescript): loader runner to ts by @wxiaoyun in #7247
- chore(infra/biome): rule useEnumInitializers by @shulaoda in #7260
- chore(infra/biome): rule useLiteralKeys by @shulaoda in #7261
- chore(infra/biome): rule noSvgWithoutTitle by @shulaoda in #7262
- chore(infra/biome): rule noDoubleEquals by @shulaoda in #7265
- chore(infra/biome): rule noForEach by @shulaoda in #7266
- chore(infra/biome): rule useSelfClosingElements by @shulaoda in #7267
- chore(infra/biome): rule useButtonType by @shulaoda in #7268
- refactor(typescript): packages/rspack/src/template from js to ts and esm by @shulaoda in #7258
- ci(fix): jest error in rspack-dev-server by @SoonIter in #7282
- ci: fix jest error of rspack-dev-server by @SoonIter in #7284
- chore(infra/biome): ...
v1.0.0-alpha.5
What's Changed
Performance Improvements β‘
- perf: reduce allocation for filename render by @h-a-n-a in #7138
- perf: optimize JS communication with lazy getters by @SyMind in #7163
- perf: reduce allocation for
TraceableError
by @h-a-n-a in #7192
Exciting New Features π
- feat: align part of compile time binary evaluation with webpack by @LingyuCoder in #7187
- feat: align StatsAsset with webpack by @LingyuCoder in #7190
- feat: add support for function types to
output.assetModuleFilename
by @xc2 in #7191 - feat: support webpackExports in magic comments by @LingyuCoder in #7198
Bug Fixes π
- fix: eval condition expr range by @ahabhgk in #7184
- fix: pattern with wildcard and globstar can't match correctly when using
glob_match
by @shulaoda in #6668 - fix: update resource in nmf resolve hook by @ahabhgk in #7200
- fix: panic in hmr cause by auxiliary_assets by @SyMind in #7197
Document Updates π
- docs(format): run prettier --write by @SoonIter in #7180
- docs: add new features section to home page by @chenjiahan in #7183
- docs: improve home page SSG and benchmark data by @chenjiahan in #7185
- docs: update stats data by @LingyuCoder in #7195
Other Changes
- refactor: move context dependency
walk_expression
intocreate_context_dependency
by @CPunisher in #6963 - chore(infra/biome): noUnusedTemplateLiteral by @SoonIter in #7176
- release: 1.0.0-alpha.4 by @SyMind in #7179
- ci: add document lint changed check by @SoonIter in #7188
- test(css-extract): enable function filename test by @JSerFeng in #7196
- chore(infra/biome): rule useNodejsImportProtocol by @SoonIter in #7181
Full Changelog: v1.0.0-alpha.4...v1.0.0-alpha.5
v1.0.0-alpha.4
What's Changed
Performance Improvements β‘
Exciting New Features π
- feat: add trace in hook macro by @JSerFeng in #7131
- feat: support
test
,include
andexclude
options forSwcCssMinimizerRspackPlugin
by @simonxabris in #7111 - feat: override strict for javascript module by @colinaaa in #7127
- feat(stats): support
StatsError.moduleTrace
by @LingyuCoder in #7123 - feat(stats): align stats factory by @LingyuCoder in #7165
Bug Fixes π
- fix: remove all unused local variables by @chenjiahan in #7134
- fix: unset cjs exports type on access exports directly by @ahabhgk in #7143
- fix: avoid type error when skipLibCheck is not enabled by @CPunisher in #7155
- fix: align resolverFactory resolveOptions parameter with resolve options by @9aoy in #7154
- fix: invalid "javascript/auto" rule.type in getRawGeneratorOptions by @9aoy in #7164
- fix: should merge parser.javascript by @ahabhgk in #7152
- fix(cli): update peerDep of rspack-cli by @hardfist in #7173
- fix(release): alpha peerDependencies in @rspack/cli by @SoonIter in #7175
- fix: resource within scheme context by @ahabhgk in #7166
Document Updates π
- docs: use CssExtractRspackPlugin and experiments.css together by @JSerFeng in #7114
- docs: update benchmark data and improve UI by @chenjiahan in #7159
- docs: update the quick start guide by @chenjiahan in #7162
- docs: polish up output config by @fi3ework in #7167
- docs: complete the target configuration by @chenjiahan in #7168
- docs: reuse HomeLayout from Rspress by @chenjiahan in #7177
Other Changes
- refactor: harmony export parser plugin by @ahabhgk in #7110
- test: enable stats test by @LingyuCoder in #7115
- release: 1.0.0-alpha.3 by @chenjiahan in #7121
- refactor: remove clone in js walk by @ahabhgk in #7137
- refactor: remove identifier.js ts-expect-error by @SoonIter in #7132
- refactor: remove ErrorHelpers.js ts-expect-error by @SoonIter in #7136
- chore(test-tools): fix type issue for benchmark CI by @chenjiahan in #7142
- refactor: js estree statement by @ahabhgk in #7141
- ci: fix the action that does not use biome in fact by @SoonIter in #7157
- test: calcuate test compatibility by test case by @LingyuCoder in #7158
- chore(infra): use pnpm isolated node-linker by @SoonIter in #7094
- chore(biome): useNumberNamespace and useConst by @SoonIter in #7160
- chore(deps): Phantom dependencies of x.mjs and scripts by @SoonIter in #7178
New Contributors
- @simonxabris made their first contribution in #7111
Full Changelog: v1.0.0-alpha.3...v1.0.0-alpha.4
v1.0.0-alpha.3
Highlights π‘
Rust Fat LTO
Rspack v1.0.0-alpha.3 enabled Rust 'fat' LTO to improve performance (#7088):
- Build performance (according to benchmark): 1% ~ 3% faster
- Smaller binary size (rspack.darwin-arm64.node): 55.4 MB -> 51.7 MB
Breaking Changes π
- feat!: detect conflicting values in
DefinePlugin
by @h-a-n-a in #7045 - feat!: use native resolver in loader by @bvanjoi in #4945
Other Changes
Performance Improvements β‘
- perf: cache
compilation.entrypoints
by @chenjiahan in #7059 - perf: remove unneeded string clone by @JSerFeng in #7104
- perf: reduce
get_scheme
allocation by @h-a-n-a in #7109 - perf: reduce alloc for bailout reason by @h-a-n-a in #7118
Exciting New Features π
- feat(rspack_core): nmf resolve in schema hook by @ScriptedAlchemy in #7039
- feat: tree shakable output for module library by @fi3ework in #6877
- feat: downgrade container runtime to es2015 by @ahabhgk in #7085
- feat: to function can return Promise by @SyMind in #7068
- feat: support more features of
DefinePlugin
by @h-a-n-a in #7108 - feat: align part of StatsError by @LingyuCoder in #7091
- feat(create-rspack): update template package name by @liangchaofei in #7092
- feat: reduce unnecessary exports runtime by @fi3ework in #7102
- feat: support type field for JsModule by @JSerFeng in #7093
Bug Fixes π
- fix: Add missing code for compatibility plugin by @CPunisher in #7079
- fix: panic when get max target in find target by @LingyuCoder in #7082
- fix: support css nonce by @LingyuCoder in #7101
- fix(mf): runtime should respect output environment by @ahabhgk in #7113
- fix: should not shake used json fields by @JSerFeng in #7119
- fix: remove unsupported
builtins.provide
by @h-a-n-a in #7086
Document Updates π
- docs: add baidu verify file for SEO optimization by @chenjiahan in #7073
- docs: fix netlify redirect cause baidu verify failed by @chenjiahan in #7074
- docs: update license ui by @9aoy in #7076
- docs: update teams page, add Rsfamily members by @chenjiahan in #7083
- docs: enable sitemap for SEO by @chenjiahan in #7105
- docs: polish migration wordings by @h-a-n-a in #7117
Other Changes
- refactor: port inner graph by @JSerFeng in #7043
- chore(infra): use import type by @SoonIter in #7099
- chore(infra): update biome useArrowFunction by @SoonIter in #7103
- chore(deps): update dependency sass-loader to v14 by @renovate in #7095
- refactor: report
Module not found
instead ofResolve Error
by @LingyuCoder in #7106 - test: enable passed webpack config cases by @LingyuCoder in #7120
New Contributors
- @liangchaofei made their first contribution in #7092
Full Changelog: v1.0.0-alpha.2...v1.0.0-alpha.3
v1.0.0-alpha.2
What's Changed
Breaking Changes π
- Upgrade swc_core from 0.95 to 0.96 by @LingyuCoder in #7069
- refactor!: use swc_plugin_prefresh instead of builtin swc plugin by @LingyuCoder in #7069
Exciting New Features π
- feat: support webpackInclude and webpackExclude by @LingyuCoder in #7055
Bug Fixes π
- fix: detect magic comments around expr by @ahabhgk in #7047
- fix: truncateArgs is not a function by @SyMind in #7052
- fix(core): migrate to rspack_resolver by @hardfist in #7063
- fix: zod is pre-bundled twice by @chenjiahan in #7064
- fix: magic comment warning by @LingyuCoder in #7056
- fix: revert detect statement level sequence expression by @ahabhgk in #7071
Document Updates π
Other Changes
- chore(lite-tapable): clean up temp/api.md by @chenjiahan in #7048
- chore: nightly release upload webpack-test metric data by @jerrykingxyz in #7051
- chore: nightly release add write contents permission by @jerrykingxyz in #7053
- chore: add provenance option to pnpm publish by @chenjiahan in #7054
- chore: migrate lint to biome by @hardfist in #7061
Full Changelog: v1.0.0-alpha.1...v1.0.0-alpha.2