Highlights
Allow passing function type to splitChunks.cacheGroups
//...
optimization: {
splitChunks: {
chunks: "all",
minSize: 0,
cacheGroups: {
splitLib2: {
chunks(chunk) {
console.log(chunk);
return chunk.name !== "lib1";
},
test: /shared\.js/,
name: "shared",
},
},
},
},
...
It gives you more flexibility to control code splitting behavior
Allow parse js hashbang syntax
Now rspack can process file like
#!/usr/bin/env node
import { foo } from "./lib";
console.log("index", foo);
A bunch of diagnostics improvement
more details you could refer:
What's Changed
Performance Improvements ⚡
Exciting New Features 🎉
- feat: 🎸 json tree shaking by @IWANABETHATGUY in #4858
- feat: add script nonce by @LingyuCoder in #4975
- feat(es): allow parse js hashbang syntax by @magic-akari in #4970
- feat(runtime): support module.parser.url=relative by @LingyuCoder in #4988
- feat(runtime): support webpack_chunkname by @LingyuCoder in #4990
- feat: support webpack_runtime_id by @LingyuCoder in #4993
- feat: stats for childCompiler by @ahabhgk in #5007
- feat: add function type splitChunks chunks by @ahabhgk in #5019
- feat: support rgb colors for ansi-html by @h-a-n-a in #5020
- feat(cli): support to set output.path by @puppet-666 in #4979
- feat: align ExportImportedSpecifierDependency init fragments by @IWANABETHATGUY in #4995
- feat: support eval abstract equal by @bvanjoi in #5037
- feat: isomorphism mf 1.0 and 1.5 by @ahabhgk in #4959
- feat: eval array and regexp in binary expr by @bvanjoi in #5051
- feat(runtime): prefetch&preload by @LingyuCoder in #5031
- feat: support pseudo webpack extension and custom module type by @JSerFeng in #5061
- feat: eval template string in binary expr by @bvanjoi in #5064
- feat: diagnostics in overlay by @h-a-n-a in #5049
- feat: add module parse error by @h-a-n-a in #5062
- feat: eval if-else stmt by @bvanjoi in #5073
Bug Fixes 🐞
- fix: add node modules to npmginore in templates by @burhanuday in #4976
- fix: align mangle exports comments by @IWANABETHATGUY in #4954
- fix(config): support pass false to plugins by @puppet-666 in #4949
- fix(@rspack/core): minify should be disabled when minimizer is an empty array by @xc2 in #4911
- fix: append builtin minify plugin for child compiler by @bvanjoi in #4987
- fix: 🐛 class memeber side effects by @IWANABETHATGUY in #4983
- fix: handle chunk relation by @JSerFeng in #4984
- fix(runtime): globals on require in runtime plugin by @LingyuCoder in #4998
- fix: parse left and right when eval failed for logic expr by @bvanjoi in #5000
- fix: license-webpack-plugin failed to generate license for some of module by @ahabhgk in #5003
- fix: stats childCompiler test by @ahabhgk in #5015
- fix: remove console.log by @LingyuCoder in #5018
- fix: runtime chunk order by @LingyuCoder in #5021
- fix: add "symlinks" option to resolve config validation by @bostondv in #5034
- fix(remove-parent-modules): only filter runtime chunk by @JSerFeng in #5036
- fix: 🐛 fix escape json by @IWANABETHATGUY in #5042
- fix: umd library integrate with newTreeshaking by @IWANABETHATGUY in #5043
- fix: remove available modules from ancestor by @JSerFeng in #4994
- fix: webpack-test/configCases/split-chunks/async-entries by @IWANABETHATGUY in #5050
- fix: extract_block_modules dependencies order by @IWANABETHATGUY in #5046
- fix: `ruleSetLogicalConditions.not should not just array by @bvanjoi in #5059
- fix: hmr css with filename by @ahabhgk in #5069
- fix: serialize path of stats on windows by @h-a-n-a in #5070
Other Changes
- ci: speed up CI by turning off sourcemap for arco-pro by @Boshen in #4985
- chore(runtime-diff): module chunk loading runtime module by @LingyuCoder in #4916
- chore: add comparator for diff tester by @LingyuCoder in #5002
- revert: "chore: add comparator for diff tester" by @LingyuCoder in #5009
- chore: run benchmark on main branch by @jerrykingxyz in #5011
- chore(diff): add more diff cases by @LingyuCoder in #5012
- chore(diff): scan diff cases by glob by @LingyuCoder in #5016
- chore: remove fast querystring just use node module querysting parse by @m1911star in #4749
- chore: update Readme.md by @hardfist in #5023
- refactor: clever merge resolve options by @bvanjoi in #4974
- chore: remove #4325 in webpack-test by @ahabhgk in #5035
- refactor: make sure add all runtime globals when process_runtime_requirements by @ahabhgk in #5032
- chore(runtime-diff): jsonp chunk loading runtime module by @LingyuCoder in #4915
- chore(rspack_core): oxc_resolver v0.6.2 by @Boshen in #5047
- refactor: diagnosable modules by @h-a-n-a in #4924
New Contributors
- @burhanuday made their first contribution in #4976
- @puppet-666 made their first contribution in #4949
- @bostondv made their first contribution in #5034
Full Changelog: v0.4.3...v0.4.4