webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
4.47.0 is the newest release of 4.x.
In short
3 new3 fixed
Release note
Features
Improve
sideEffectsflag behavior when dynamic modules are part of the treeFixes a bug which causes empty modules (or type-only modules) to "break" Tree Shaking
Add
splitChunks.enforceSizeThresholdto allow enfore splitting larger chunks unrelated from other limiationsNot set by default to avoid breaking change
It will be set by default to 50k in webpack 5
It's recommended to set it in webpack 4 too
Add support for
resolve.rootsand defaultresolve.roots: [context]This allows to resolve server-relative urls (e.g.
/src/abc) to the project root (or other locations when configured)This allows to use loaders that rely on that behavior
Bugfixes
Fix bug where splitChunks produced non-optimal results when
minSizeis set to0This lead to
NaNs in some places which breaks ordering
Fix bug which lead to HMR not working for splitChunks in entrypoints
Force update watchpack and chokidar for chokidar bugfix which causes files to stop being watched
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.