Highlight
Support option resolveLoader
With this option, you can specify the resolving strategy for each loader.
For example, if you are developing a loader and want to showcase its usage from a user's perspective in an example, you can write:
module.exports = {
resolveLoader: {
alias: {
'amazing-loader': require.resolve('path-to-your-amazing-loader'),
},
},
};
Then, in the example code, you can write:
require('!!amazing-loader!./amazing-file.js');
What's Changed
Performance Improvements ⚡
- perf: reduce BuildMeta size by @underfin in #4027
- perf: reduce ModuleGraphModule memory size by @underfin in #4034
- perf: merge HarmonyImportSideEffectDependency into HarmonyImportDependency by @underfin in #4037
- perf: reduce task structs memory size by @underfin in #4035
Exciting New Features 🎉
- feat(webpack-tree-shaking): side effects plugin by @IWANABETHATGUY in #4007
- feat: merge same init fragments by @underfin in #4004
- feat: cjs analyze by @underfin in #3962
- feat: add HarmonyImportSideEffectDependency by @underfin in #4010
- feat: support option
resolveLoader
by @h-a-n-a in #4008 - feat: export
Watching
type by @hardfist in #4014 - feat: support
ident
for builtin loader by @h-a-n-a in #4038
Bug Fixes 🐞
- fix: disable DevtoolPlugin when options.devtool=false by @LingyuCoder in #4005
- fix(runtime): should calculate
initial_chunks
correctly by @hyf0 in #4022 - fix: tree shaking transitive bailout by @IWANABETHATGUY in #4017
- fix: add workaround for accessing previous stats by @h-a-n-a in #4028
Other Changes
- chore: add benchmark test for merge queue by @jerrykingxyz in #3995
- chore: update benchmark website by @hardfist in #4025
- ci: reduce binary size by @h-a-n-a in #4018
- refactor: changed ModuleGraph dependencies to BoxDependency by @underfin in #4026
- chore: fix html test by @hardfist in #4023
- refactor(rspack_loader_runner): remove nodejs_resolver dependency by @Boshen in #3982
- revert: "fix: getHash occasionally panic when rebuild (#3970)" by @h-a-n-a in #4029
- chore: fix nestjs example by @hardfist in #4011
- refactor: add InitFragment trait by @underfin in #4046
- refactor(rspack_core): implement resolver proxy by @Boshen in #4048
Full Changelog: v0.3.0...v0.3.1