Highlights 💡
Advanced tree-shaking
Rspack v1.5.3 ships advanced tree-shaking for dynamic imports via member expression analysis.
Ongoing improvements are in progress, and upcoming releases will continue to improve static analysis to cover more syntax patterns, such as dynamic import
with a subsequent .then()
.

What's Changed
Performance Improvements ⚡
- perf: improve bundle splitting by @LingyuCoder in #11556
- perf: improve for each runtime by @LingyuCoder in #11573
- perf: improve exports info by @LingyuCoder in #11524
- perf: improve deterministic chunk ids by @LingyuCoder in #11575
- perf: improve get chunk modules by @LingyuCoder in #11579
- perf: improve create hash by @LingyuCoder in #11598
- perf: drop some big data in rayon by @LingyuCoder in #11611
New Features 🎉
- feat(browser): support
ModuleFederationPlugin
by @CPunisher in #11558 - feat: simplify mock logic, dynamic import based hoist by @fi3ework in #11521
- feat: add css field support in Experiments configuration by @ityuany in #11548
- feat: add start time parameter to NativeWatcher by @GiveMe-A-Name in #11570
- feat: tree shake statically analyse-able dynamic import by @ahabhgk in #11457
- feat: static analyze in operator for esm import specifier by @ahabhgk in #11613
- feat(browser): add
postprocess
andResolvedRequest
toBrowserHttpImportEsmPlugin
by @CPunisher in #11571
Bug Fixes 🐞
- fix: don't throw error when browserslist config is resolved from env var by @Themezv in #11528
- fix: use stable swc lexer for correct asi by @ahabhgk in #11555
- fix: mf hoist should record mutation by @ahabhgk in #11560
- fix: respect to
jsc.output.charset
in swc loader by @CPunisher in #11568 - fix: BuildDependencies resolve exports_fields incorrectly by @jerrykingxyz in #11576
- fix(types): correct the source map type for loaders by @chenjiahan in #11574
- fix: only enable inline const in production by @ahabhgk in #11591
- fix(rslib): treat
module
identifier as normal by @fi3ework in #11588 - fix: css-chunking-plugin for global css by @SyMind in #11592
- fix: flaky css chunking test case by @SyMind in #11608
- fix: swc wasmtime cache corruption by @quininer in #11607
Refactor 🔨
- refactor: use for_name for cjs import parser plugin by @ahabhgk in #11569
- refactor: rspack error by @jerrykingxyz in #11500
- refactor: Dependency remove source_map field by @jerrykingxyz in #11582
- refactor: private javascript parser dependencies by @ahabhgk in #11587
- refactor: lazy compilation stop cache create_data by @jerrykingxyz in #11612
- refactor: remove wasm plugin useless code by @jerrykingxyz in #11615
Document Updates 📖
- docs: add tree shaking blog to the blog list by @chenjiahan in #11561
- docs(loader-api): add new sections for handling source maps by @chenjiahan in #11585
- docs: fix esm syntax error by @lzxb in #11601
Other Changes
- chore(deps): update dependency @rsbuild/plugin-sass to ^1.4.0 by @renovate[bot] in #11564
- chore(deps): update dependency @shikijs/transformers to ^3.12.1 by @renovate[bot] in #11566
- chore(deps): update dependency @rspack/plugin-react-refresh to ^1.5.0 by @renovate[bot] in #11565
- chore: use pnpm in package.json scripts by @ahabhgk in #11520
- chore: use local package for scripts by @ahabhgk in #11572
- chore(workflow): allow renovate to update SWC related crates by @chenjiahan in #11580
- chore(deps): update crate swc_core to v38.0.1 by @renovate[bot] in #11586
- chore: update Rspress to beta.31 to use JSON schemas by @chenjiahan in #11596
- chore(deps): update dependency memfs to v4.38.2 by @renovate[bot] in #11603
- chore(deps): update swc (major) by @renovate[bot] in #11606
New Contributors
Full Changelog: v1.5.2...v1.5.3