What's Changed
Highlight
- Support alias require:
// commonjs file
const alias = require
alias('./foo') // now `foo.js` will be bundled
Performance Improvements ⚡
Exciting New Features 🎉
- feat: support alias require by @bvanjoi in #5520
- feat(rspack_core): use consistent fxhash for ustr instead of inconsistent ahash by @Boshen in #5504
- feat(rspack): align default resolveOptions with webpack by @Boshen in #5540
- feat: concatenation module part two by @IWANABETHATGUY in #5415
- feat: support custom source root by @SyMind in #5522
- feat(devtool): add "eval" support by @xc2 in #5495
- feat: deprecate
compiler.rebuild
by @h-a-n-a in #5583
Bug Fixes 🐞
- fix: not parse require in esm by @bvanjoi in #5515
- fix: test jobs should not run in forked repositories by @SyMind in #5499
- fix: module not exist in context modules by @h-a-n-a in #5534
- fix: fix test for consistent splitChunk by @JSerFeng in #5539
- fix: wrongly generated alternative requests in context modules by @h-a-n-a in #5538
- fix: should split chunks size larger than maxSize by @JSerFeng in #5562
- fix: 🐛 call finish module in rebuild_module instead of update_module_graph by @IWANABETHATGUY in #5559
- fix: exec
per_statement
parser hooks by @bvanjoi in #5568 - fix: json parse error by @h-a-n-a in #5565
- fix(cli): fix cts support by @hardfist in #5575
- fix: zod.devtool - missing inline-nosources-cheap-source-map by @xc2 in #5478
- fix: source root error in windows by @SyMind in #5581
- fix: 🐛 inner graph extend class super with constructor by @IWANABETHATGUY in #5552
- fix: buildinfo cacheable default value should be true by @jerrykingxyz in #5603
- fix: missing visitor in concatenate modules by @IWANABETHATGUY in #5591
- fix: codegen cache should consider runtime by @JSerFeng in #5605
- fix: should gracefully shutdown on bail by @h-a-n-a in #5610
Other Changes
- typo: Update index.ts by @cunzaizhuyi in #5511
- refactor: cleanup
HarmonyDetectionScanner
by @bvanjoi in #5508 - refactor: cleanup
WorkerSyntaxScanner
in deps collection stage by @bvanjoi in #5512 - ci: change renovate bot to run only once per week by @Boshen in #5514
- refactor: cleanup
WorkerSyntaxScanner
in optimize by @bvanjoi in #5513 - ci: enable swc for renovate bot by @Boshen in #5517
- chore: add tests for consistent splitChunks output by @JSerFeng in #5510
- chore: use the same postcss version for this monorepo by @Boshen in #5518
- chore: remove ci pull_request branches-ignore by @jerrykingxyz in #5529
- refactor: cleanup
WorkerScanner
by @bvanjoi in #5527 - chore: 🤖 remove tree shaking diff by @IWANABETHATGUY in #5530
- revert: revert tests for consistent splitChunks output by @JSerFeng in #5537
- refactor: align external module and static exports dependency with webpack by @LingyuCoder in #5542
- chore(deps): update swc by @renovate in #5519
- chore: remove "Test Plan" from pull request template by @Boshen in #5541
- chore: update issue template with title prefix by @hardfist in #5553
- refactor: move chunk_group_info to code splitting by @JSerFeng in #5549
- chore: rename split_chunks_new to split_chunks by @JSerFeng in #5555
- chore(deps): update crates by @renovate in #5523
- refactor: add
ImportMetaContextDependencyParserPlugin
by @bvanjoi in #5557 - chore: align more tests by @h-a-n-a in #5558
- ci: don't cancel jobs on main by @Boshen in #5563
- revert: feat: support custom source root (#5522) by @SyMind in #5561
- refactor: immutable module graph during code generation by @LingyuCoder in #5543
- chore: more total cases by @h-a-n-a in #5569
- refactor: initialize stage hook for
hooks.compilation
by @ahabhgk in #5532 - chore: avoid const enum in node binding dts by @ahabhgk in #5584
- refactor: cleanup
HotModuleReplacementScanner
by @bvanjoi in #5585 - refactor: cleanup some expr_match in parser by @bvanjoi in #5589
- chore: align more hotcases by @h-a-n-a in #5566
- chore: 🤖 add comments when the export name is unused by @IWANABETHATGUY in #5598
- chore: align the rest of diffing cases by @h-a-n-a in #5599
- chore: run diff on linux only by @h-a-n-a in #5602
- refactor: on demand apply
hooks.compilation
js hook by @ahabhgk in #5586 - refactor: cleanup
ImportScanner
by @bvanjoi in #5607 - test: add test case for eager import by @bvanjoi in #5608
- chore: remove wrapped module identifier by @IWANABETHATGUY in #5609
- refactor: cleanup
ImportMetaScanner
by @bvanjoi in #5547
Full Changelog: v0.5.3...v0.5.4