Releases: web-infra-dev/rspack
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
v1.0.0-alpha.1
What's Changed
Breaking Changes π
Performance Improvements β‘
Exciting New Features π
- feat: enable lightning css minimizer error recovery by @ahabhgk in #6995
- feat: support nmf resolve hook by @ahabhgk in #6998
- feat: support splitChunkSizes type by @wxiaoyun in #6989
- feat: refresh overlay by @JiangWeixian in #6161
- feat: align webpack target and stats api by @SyMind in #7027
- feat: support fetch priority by @LingyuCoder in #7029
Bug Fixes π
- fix(config): allow entry function to return promise by @chenjiahan in #6975
- fix: use max_entrypoint_size in add_entrypoints_over_size_limit_warning by @escaton in #6923
- fix: experiments css exports convention tree shaking by @ahabhgk in #6997
- fix: align source name conflict handling by @CPunisher in #6993
- fix: should not generate pure expression if test is failed by @h-a-n-a in #7014
- fix: use lite-tapable for enhanced-resolve by @ahabhgk in #7021
- fix: fix npm script in window by @daydayhappychao in #5164
- fix: pnpm install failed in ci by @SyMind in #7036
- fix: wrong cjs exports type caused unexpected exports presence by @ahabhgk in #7028
- fix: add warning for context module flag g and y by @ahabhgk in #7044
- fix: deduplicate extracted comments by @CPunisher in #7040
Document Updates π
- docs: announcing Rspack v1.0 alpha by @chenjiahan in #6945
- docs: remove invalid OG image by @chenjiahan in #6982
- docs: add doc about switch back to SwcCssMinimizerRspackPlugin by @hardfist in #6983
- docs: deduplicate plugin support status list by @xc2 in #6988
- docs: complete the module methods by @LingyuCoder in #6999
- docs: module variables by @LingyuCoder in #6980
- docs: add specifics for api meta by @LingyuCoder in #7002
- docs: add Module Federation to features list by @chenjiahan in #7011
- docs: improve externals plugin doc by @SyMind in #7009
- docs: add prefetch&preload modules by @LingyuCoder in #7010
- docs: default value in node config by @SyMind in #7015
- docs: update compilation hooks by @LingyuCoder in #7018
- docs: add fetch priority by @LingyuCoder in #7037
Other Changes
- refactor: move test dirs to tests by @LingyuCoder in #6973
- test: stable stage-0-factorize test by @ahabhgk in #6981
- refactor: resolve nodejs 22 deprecation warning by @xc2 in #6987
- chore: disable renovate update for swc by @hardfist in #6991
- chore: add deprecated notice for rspack-plugin-minify by @hardfist in #6992
- chore: fix renovate config by @xc2 in #6994
- refactor: extract lite tapable by @ahabhgk in #7000
- chore(module-federation): update @module-federation/runtime-tools to 0.2.3 version by @zhoushaw in #7025
- test: enable webpack cjs-treeshaking reexport cases by @xc2 in #7017
- chore(readme): remove underlines between badges by @wxiaoyun in #7024
- chore: release force use github runner by @jerrykingxyz in #7038
- test: enable cases/context/issue-10969 by @ahabhgk in #7041
- chore: release run macos test when arch match by @jerrykingxyz in #7046
Full Changelog: v1.0.0-alpha.0...v1.0.0-alpha.1
v1.0.0-alpha.0
What's Changed
See π Announcing Rspack v1.0 Alpha for more details
Breaking Changes π
- fix!: change default value of css to false, align with webpack by @JSerFeng in #6910
- feat!: enable lightning css minimizer as default css minimizer by @ahabhgk in #6960
- feat: deprecate JavaScript API (part 2) by @h-a-n-a in #6859
- fix: compilation errors and warnings should be
RspackError
by @h-a-n-a in #6900 - feat: upgrade swc to latest version by @hardfist in #6887
- refactor: remove profile integration timestamp by @LingyuCoder in #6947
- feat: remove fields of
SwcJsMinimizerRspackPluginOptions
by @h-a-n-a in #6950 - fix!: align optimization.moduleIds and optimization.chunkIds when mode=none by @LingyuCoder in #6956
- feat!: remove output.amdContainer from config by @fi3ework in #6958
- feat!: revert default values of SwcJsMinimizer by @h-a-n-a in #6970
- fix!: set default value of concatenateModules to true in production mode by @JSerFeng in #6959
- refactor!: remove resolve tsConfigPath by @ahabhgk in #6872
- fix!: align devtool default value by @SyMind in #6904
Performance Improvements β‘
Exciting New Features π
- feat(napi): support js chunk hash hook by @ahabhgk in #6853
- feat(napi): compilation chunk hash hook by @ahabhgk in #6858
- feat: root module is less prone to be wrapped in IIFE by @fi3ework in #6697
- feat: CopyRspackPlugin support function
to
option by @9aoy in #6866 - feat: remove styled-components, emotion and relay in builtin swc-loader by @h-a-n-a in #6862
- feat: align split-chunks stats by @SyMind in #6847
- feat: generating provenance statements by @chenjiahan in #6896
- feat: add
factoryMeta
toJsModule
and optimizeInnerGraphPlugin
for variable decl with iife by @CPunisher in #6888 - feat: simple custom worker syntax by @ahabhgk in #6899
- feat: add nwjs target to rspack config by @wxiaoyun in #6880
- feat: add build unique id for detecting by @LingyuCoder in #6865
- feat: encode filename in EvalDevToolModulePlugin by @SyMind in #6903
- feat: add stats.module.dependent by @LingyuCoder in #6913
- feat(cli): defineConfig support all types by @chenjiahan in #6911
- feat: add nwjs external preset by @wxiaoyun in #6907
- feat: custom worker syntax for worklet by @ahabhgk in #6916
- feat: support deep AST parsing in debug by @h-a-n-a in #6919
- feat: add idHints and hash of stats.chunk by @LingyuCoder in #6920
- feat: support nested webpack_exports by @ahabhgk in #6930
- feat: fully support EvalSourceMapDevToolPlugin by @SyMind in #6933
- feat: support use data uri with inline loaders by @h-a-n-a in #6939
- feat(create-rspack): improve the templates by @chenjiahan in #6940
- feat: add contextInfo on resolveData by @ahabhgk in #6948
- feat: align stats.assets[].info by @LingyuCoder in #6951
- feat: optimize filename function diagnostic by @h-a-n-a in #6953
- feat(cli): add --profile to enable stats module profile by @LingyuCoder in #6957
- feat: stats origin moduleid by @LingyuCoder in #6955
- feat: align stats chunk group by @LingyuCoder in #6961
Bug Fixes π
- fix: ci wrong in github runner by @SyMind in #6852
- fix: export default when environment supports const by @ahabhgk in #6861
- fix: pre walk class blocks by @ahabhgk in #6867
- fix: should not eval exports in harmony by @ahabhgk in #6883
- fix: clean up dependencies and types for emotion / relay by @chenjiahan in #6892
- fix: fix type of CssExtractRspackPluginOptions.{filename,chunkFilename} by @xc2 in #6882
- fix: missing bailout reason after introducing css extract plugin by @xc2 in #6875
- fix: sources in source map when use EvalSourceMapDevToolPlugin by @SyMind in #6901
- fix: CopyRspackPlugin transform option type by @9aoy in #6908
- fix: devtool plugin cache conflict !macos by @SyMind in #6912
- fix: fix release build by @h-a-n-a in #6921
- fix: use entrypoint.options.runtime as key for chunk_graph.runtime_ids map if possible by @escaton in #6928
- fix: context passed into the
ModuleFactory
is not correct by @h-a-n-a in #6946 - fix!: align webpack defaults by @SyMind in #6949
- fix: sources types by @SyMind in #6944
- fix: should not using single line match in data url regex by @JSerFeng in #6952
- fix: fix duplicated harmony exports with named exports and re-exports star by @h-a-n-a in #6962
Document Updates π
- docs: fixed typo on compatibility list header by @ebektasiadis in #6886
- docs: fix rspack exports in javascript-api.mdx by @sudoaugustin in #6889
- docs: fix rspack exports in zh javascript-api.mdx by @chenjiahan in #6893
- docs: explain
VariableInfo
by @bvanjoi in #6914 - docs: polish up guide docs by @fi3ework in #6922
- docs: review devtool and entry config docs by @Timeless0911 in #6917
- docs: improve webpack migration by @SyMind in #6918
- docs: fix license badge and add node badge by @chenjiahan in #6929
- docs(config): temporary fix for mdx display bug by @wxiaoyun in #6932
- docs: add stats data by @LingyuCoder in #6937
- docs: describe stats data structure with ts types by @LingyuCoder in #6941
- docs: polish up external config by @fi3ework in #6942
- docs(contributing): breaking change PR format by @chenjiahan in #6969
- docs: update assets URLs by @chenjiahan in #6972
- docs: upgrade latest discord invitation link by @SoonIter in #6977
- docs: use of nightly/canary version and install-rspack script by @SoonIter in #6974
Other Changes
- chore(deps): update crates (major) by @renovate in #6855
- chore: remove old tree shaking code by @ahabhgk in #6884
- refactor: worker parser plugin by @ahabhgk in #6881
- revert: chore(deps): update crates (major) (#6855) by @h-a-n-a in #6894
- test: fix using HotSnapshotProcessor in webpack by @colinaaa in #6885
- chore: refactor rspack_plugin_devtool by @SyMind in #6897
- chore: optimize profile dir creation by @xc2 in #6879
- chore(release): rename package canary name by @SoonIter in #6906
- chore: clean up unused dev dependencies by @chenjiahan in #6924
- chor...
v0.7.5
v0.7.4
What's Changed
Highlights
LightningCSS minimizer
In v0.7.4 Rspack provides a new CSS minimizer which uses Lightning CSS under the hood, for now you can enable it by optimization.minimizer
, and in Rspack v1.0, it will be enabled by default.
And here are two very useful features powered by the new LightningCSS minimizer:
- removeUnusedLocalIdents: during minification, it removes the CSS declarations corresponding to the unused-symbols. This allows Rspack to work with CSS modules' tree shaking to remove unused CSS declarations corresponding to exports (previously, it would only remove the JS exports).
- browserslist: with this options minification will also performs downgrading. If the postcss-loader was previously used only for downgrading, it can be removed.
Checkout our docs for more details.
Compatible with worker-loader
In v0.7.4 Rspack is compatible with worker-loader, which is usually used by some older projects, so this is provided only as a temporary solution to facilitate these older projects migration to Rspack, checkout our docs for more details.
Exciting New Features π
- feat: lightningcss minimizer by @ahabhgk in #6801
- feat: export FetchCompileAsyncWasmPlugin for worker loader by @ahabhgk in #6832
- feat: add more stats module properties by @LingyuCoder in #6799
- feat: add build time executed modules to stats by @LingyuCoder in #6829
- feat: upgrade webpack latest version by @SyMind in #6800
- feat(runtime): enable rspack version by @zmzlois in #6817
Bug Fixes π
- fix(mf): avoid error webpack_require.f.consume after hmr by @ahabhgk in #6796
- fix: css modules composes same ident with local class by @ahabhgk in #6815
- fix: fix segmentation fault with custom loader by @h-a-n-a in #6824
- fix: basically same codegen of arco-pro by @ahabhgk in #6826
- fix: parse url dependency for minimized css by @ahabhgk in #6827
- fix: should be able to add loader resolver dependencies by @h-a-n-a in #6828
- fix: generate suggestions if api-extractor failed the test by @h-a-n-a in #6834
- fix(cli): should close compiler after building by @chenjiahan in #6835
- fix: docs ci wrong in node 16 by @SyMind in #6840
- fix: source map wrong when columns is false by @SyMind in #6841
- fix: sourceMapFilename default value by @SyMind in #6845
- fix: panic of module_graph.get_depth by @LingyuCoder in #6846
Document Updates π
- docs: update slogan and descriptions by @chenjiahan in #6798
- docs: name and dependencies by @SyMind in #6806
- docs: improve
module.rules.descriptionData
by @leimonio in #6797 - docs: infrastructureLogging by @SyMind in #6808
- docs: translate
Rule.descriptionData
by @chenjiahan in #6813 - docs: complete output config by @SyMind in #6814
- docs: add semver declaration by @h-a-n-a in #6825
- docs: complete experiments docs by @SyMind in #6823
- docs: complete module docs by @SyMind in #6843
Other Changes
- chore: mark defferent between webpack defaults by @SyMind in #6795
- chore: remove useless Serialize and Deserialize by @jerrykingxyz in #6809
- chore: add congcong to team member list by @LingyuCoder in #6811
- chore: remove unused lazy compilation file by @LingyuCoder in #6812
- ci: check implemented but not documented configs by @SyMind in #6810
- refactor: cleanup JavaScript API by @h-a-n-a in #6831
- chore(deps): update dependency ws to v8.17.1 [security] by @renovate in #6842
New Contributors
Full Changelog: v0.7.3...v0.7.4