Highlights
Support compilation.hooks.afterOptimizeModules
hook
Called after modules optimization has completed.
compilation.hooks.afterOptimizeModules.tap("plugin_name", function(modules) {
// do something
})
Support __webpack_is_included__
Test whether or not the given module is bundled by rspack.
if (__webpack_is_included__('./module-a.js')) {
// do something
}
Support webpackPrefetch
and webpackPreload
When doing dynamic import, it is allowed in the magic comments to tell the browser whether the resource will be used in the future.
import(
/* webpackPrefetch: true */
/* webpackPreload: true */
'module'
);
Support error early bail
Fail out on the first error instead of tolerating it.
// rspack.config.js
module.exports = {
//...
bail: true,
};
What's Changed
Exciting New Features 🎉
- feat: deprecate apply options lazily by @ahabhgk in #5066
- feat: introduce
is_strict
in scanner by @bvanjoi in #5076 - feat: support webpack_is_included by @LingyuCoder in #5087
- feat: integrate mf 1.5 runtime by @ahabhgk in #5063
- feat: eval regexp in require.context by @bvanjoi in #5094
- feat: support error early bail by @h-a-n-a in #5084
- feat: support
hooks.afterOptimizeModules
by @bvanjoi in #5102 - feat: support custom filename for GetChunkFilenameRuntimeModule by @JSerFeng in #5105
- feat(mf): add version check warning for sharing by @ahabhgk in #5116
Bug Fixes 🐞
- fix: try to fix execution context destroy by @h-a-n-a in #5077
- fix: boolean matcher regexp by @LingyuCoder in #5080
- fix: exportImportedspecifier interop by @IWANABETHATGUY in #5083
- fix: OOM when use trace by @jerrykingxyz in #5079
- fix: unnecessary import runtime code from css_loading_with_loading.js by @SyMind in #5055
- fix: pass define plugin to childCompiler by @ahabhgk in #5093
- fix: unique name in load script runtime module by @LingyuCoder in #5098
- fix: asset publicPath in css with rule asset generator by @ahabhgk in #5099
- fix: umd with library.export by @IWANABETHATGUY in #5092
- fix: apply entry lazily warning message by @ahabhgk in #5109
- fix(mf1.5): remoteInfos when moduleIds is not named by @ahabhgk in #5101
Other Changes
- chore: force build JS packages on CI by @h-a-n-a in #5075
- chore: add comparator for diff tester by @LingyuCoder in #5014
- refactor: move most options to builtin plugin by @ahabhgk in #5078
- chore(runtime-diff): require chunk loading runtime module by @LingyuCoder in #4913
- chore(runtime-diff): import scripts chunk loading diff runtime module by @LingyuCoder in #4914
- chore(runtime-diff): read file chunk loading runtime module by @LingyuCoder in #4912
- chore: remove heavy debug node
util.inspect
call by @Boshen in #5029 - chore: fix typos in JavaScript and TypeScript files by @Boshen in #5095
- chore: send notification when main branch ci failed by @jerrykingxyz in #5112
Full Changelog: v0.4.4...v0.4.5