webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
5.113.0 is the newest release of 5.x.
Summary· from the note as AI read it
Migration neededRead before upgrading: 1 change to make.
Before you upgrade
- Re-run typecheck; stricter module, parser, stats and loader types may fail
New
- Minify JavaScript faster, folding string methods on constants and
x -= 1. - Shorten minified JavaScript, and keep it running like its source.
- Drop more unused functions, arguments, calls, global reads and variable copies when minifying JavaScript.
- Minify JavaScript smaller where swc does, and fold a function's
lengthright. - Reduce JavaScript output size where oxc or swc produce smaller output.
In short
1 breaking1 new7 faster22 fixed1 internal
- Breaking
Use precise, generic types for modules, parsers, generators, stats and loaders.
Release note
Patch Changes
Rebuild a lazy barrel in watch when what it defers changes, and keep the imports and re-exports it still runs.
Rebuild under
cacheUnaffecteda module whose re-export target goes or returns.Fix "Self-reference dependency has unused export name" for CommonJS namespace re-exports.
Fix
exportType: "style"CSS modules throwing outside the runtime chunk.Fix crash when a CSS module with
exportType: "style"imports an ignored stylesheet.Keep empty process environment variables that
.envfiles don't define inDotenvPlugin.Rehash an ESM entry chunk when a chunk it imports by file name changes.
Handle a NUL inside an HTML CDATA section the way the parsing spec does.
Keep module exports live across chunks, runtimes, HMR and eval, sparing globals.
Await asynchronous modules that
ProvidePlugininjects into ES modules.Keep a resolve that ends after the compiler closed from throwing.
Preserve string names passed to SharedWorker constructors.
Preserve string contents when extracting source map comments.
Scope strict-mode, async and generator block function declarations to their block.
Preserve raw dotenv values when reusing cached environment files.
Preserve assigned or patched built-ins, conversions and pattern targets.
Keep globals a
globalThiswrite replaces, andsliceon a patched array.Skip HTML script tags for shared chunks that emit no JavaScript.
Keep the digits Firefox lays out a minified CSS percentage with.
Reject a second
srcsetdescriptor after a0xdensity descriptor.Minify JavaScript faster, folding string methods on constants and
x -= 1.Shorten minified JavaScript, and keep it running like its source.
- Removed
Drop more unused functions, arguments, calls, global reads and variable copies when minifying JavaScript.
Minify JavaScript smaller where swc does, and fold a function's
lengthright.Reduce JavaScript output size where oxc or swc produce smaller output.
Update watchpack to 2.6.3 and rebuild on a
node_modulescreated mid-build.Support
concatenateModuleswithcacheUnaffected.Keep CSS fallbacks, vendor overrides,
oklch()hues and HTML elements.Validate
CleanPluginandDotenvPluginoptions with a precompiled check, so valid options no longer compile their schema at startup.Speed up startup and CSS minification, sharing the compile cache with workers.
Use precise, generic types for modules, parsers, generators, stats and loaders.
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.