webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
2.7.0 is the newest release of 2.x.
In short
9 new7 fixed
Release note
Highlighted Features
import() now allows to configure a chunk name
import(/* webpackChunkName: "my-chunk-name" */ "module")
require.ensure has a error callback
require.ensure([], () => {
require("a");
}, err => {
console.error("We failed to load chunk: " + err);
}, "chunk-name");Features
Update to acorn 5
Resolve context is provided to resolver
Add
warningsFilterto stats options to filter warningsAdd
__webpack_chunkname__toExtendedAPIPluginSupport string chunk ids
Add
NamedChunksPluginwhich allows to set chunk id, i. e. to chunk nameAllow to provided different watch options for multiple compilations
Add error handler callback to
require.ensureAdd chunk name option for
import()
Bugfixes
Main flag for HMR is set correctly
Ignored modules are now context-agnositic
Recorded paths are now platform-agnositic
Fix for local AMD modules which wrap commonjs
Erros now print more detailed message when logged
Fix missing SourceMaps for non-entry chunks after rebuild
Variables now hoist in scope
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.