What's Changed
Highlights
Check exports presence
Now Rspack will emit warnings for using non-existent exports and conflicting re-exports, checkout docs for more details.
10%-15% performance improvement for JavaScript parsing
The old JavaScript parser performs multiple times of parsing and code generation.
In this version, Rspack refactored the current implementation. It's one time parsing now.
Check out the PR for detail.
Performance Improvements ⚡
Exciting New Features 🎉
- feat: support target in loader context by @LingyuCoder in #6640
- feat(css-extract): add defaultExport and namedExport support by @JSerFeng in #6657
- feat: support javascript.parser.exportPresence by @ahabhgk in #6660
- feat: lazy compilation ignore global entry by @JSerFeng in #6674
- feat: partial support compilation.additionalTreeRuntimeRequirements hook by @LingyuCoder in #6677
- feat: add
optimization.moduleIds: 'natural'
by @colinaaa in #6685 - feat: add
optimization.chunkIds: 'natural'
by @colinaaa in #6692 - feat: support
_module
of LoaderContext by @CPunisher in #6631
Bug Fixes 🐞
- fix: loader context target array by @LingyuCoder in #6642
- fix: css modules ident escape by @ahabhgk in #6653
- fix: should not lazy static context element dependency by @JSerFeng in #6655
- fix: replace
\0
to\u200b
by @LingyuCoder in #6656 - fix: apply js rule on module federation runtime by @ahabhgk in #6672
- fix: use numeric moduleId by @colinaaa in #6688
- fix: installedCssChunks unicode error on windows by @LingyuCoder in #6682
- fix: should insert semi after variable decl by @h-a-n-a in #6703
- fix: should error when matched alias not found by @ahabhgk in #6691
- fix: local class with charset by @ahabhgk in #6705
- fix: allow return outside functions in scripts by @h-a-n-a in #6706
- fix: should generate correct hash for assets by @LingyuCoder in #6713
- fix: lazy compilation should escape data uri and should not rely on dependency request by @JSerFeng in #6716
- fix: correct runtime condition expression by @ahabhgk in #6723
Document Updates 📖
- docs: announcing 0.7 by @9aoy in #6562
- docs: fix og image URL by @chenjiahan in #6635
- docs: improve lazy compilation document by @chenjiahan in #6638
- docs: change compatibility link by @ZLY201 in #6650
- docs: update esModule generator description & version by @leimonio in #6646
- docs: rewrite the webpack migration guide by @chenjiahan in #6669
- docs: display edit link in the footer by @chenjiahan in #6678
- docs: correct GitHub spelling by @bamboofive in #6680
- docs: exports presence by @ahabhgk in #6681
- docs: update support status of
BannerPlugin
by @colinaaa in #6693 - docs: update description for exportsOnly config by @leimonio in #6686
- docs: translate exportsOnly description by @chenjiahan in #6700
Other Changes
- chore: update swc-minifier by @JSerFeng in #6634
- chore: cleanup compilation struct by @ahabhgk in #6637
- chore(test): force colorize Jest output by @fi3ework in #6658
- test: use
toMatchFileSnapshot
by @colinaaa in #6663 - refactor: make_module_graph use immutable compilation by @jerrykingxyz in #6670
- chore: fix testDir by @JSerFeng in #6679
- refactor(cli): Reduce some additional judgments and branch conditions by @Simon-He95 in #5461
- ci: incremental patch version when release canary and nightly by @LingyuCoder in #6684
- refactor: regenerate module_graph after finish make by @jerrykingxyz in #6694
- refactor: cleanup JavaScript parsing by @h-a-n-a in #6583
- chore: ignore json named exports warnings for non-strict ESM by @ahabhgk in #6698
- refactor: cleanup JavaScript parsing 2 by @h-a-n-a in #6710
- refactor: cleanup source-map stub by @h-a-n-a in #6712
- test: add config type to css extract test cases by @LingyuCoder in #6695
New Contributors
- @ZLY201 made their first contribution in #6650
- @bamboofive made their first contribution in #6680
- @Simon-He95 made their first contribution in #5461
- @CPunisher made their first contribution in #6631
Full Changelog: v0.7.0...v0.7.1