webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
5.113.0 is the newest release of 5.x.
In short
4 new7 fixed5 changed
Security
2 advisories affect 5.12.0; 5.94.0 fixes them
- CriticalCross-realm object access in Webpack 5GHSA-hc6q-2mpp-qw7j · 13 Mar 2023Fixed in 5.76.0
- ModerateWebpack's AutoPublicPathRuntimeModule has a DOM Clobbering Gadget that leads to XSSGHSA-4vvj-4cpr-p986 · 27 Aug 2024Fixed in 5.94.0
Release note
Features
Add
experiments.layersentry.xxx.layer: "name-of-layer"allows to set the layer for an entrypointmodule.rules.issuerLayer: RuleConditionallows to filter/match by layer of issuermodule.rules.layer: "name-of-layer"allows to set the layer of an modulesplitChunks.cacheGroups.xxx.layerallows to select modules by layerexternals.byLayer["name-of-layer"]allows to specify externals by layerexternals.byLayer: (layer) => ...allows to specify externals by layerexternalsfunction has an additional argument propertycontextInfowhich contains info about the issuer (e. g. the layer)
Add
module.parserandmodule.generatoroptions to allow to specify parser/generator options globally per module typeMake
chunkIdvariable available in script tag hook (like it was with webpack 4)
Bugfixes
Escape exclamation marks in context regexp when generating readable module names/ids
Fix a problem when bundling webpack bundles with enabled eval-based devtools
Add
stats.nestedModulesSpaceto schema to allow to specify this optionFix a bug that incorrectly replaces
new.targetwith constantsFix a bug where
splitChunkminSizeis not handled correctlyFix a bug where the order of
splitChunkcacheGroupsis not handled correctlyAvoid adding non-filesystem resources as dependencies for watching and caching
Developer experience
Fix incorrect negation in hint comment for eval-based devtools
Improve error messages of "Library/Chunk Loading/Wasm Loading typeof is not enabled" errors
Improve question message when asking to install webpack-cli
Show a warning when loaders/plugins report invalid dependencies to webpack
Contributing
Examples use webpack-cli 4 now
Rename memorize to memoize
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.