webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
5.113.0 is the newest release of 5.x.
In short
18 new1 faster49 fixed3 internal
Release note
Minor Changes
Enable
output.moduleby default withfutureDefaultson ESM-capable targets.Remove
experiments.outputModule, setoutput.moduleto emit ESM instead.Add
output.copyto copy files and directories into the output directory.Minify inline CSS and JSON via
renderEmbeddedSource, exporting webpack's own.Export
cssMinifyandhtmlMinifyoncss.syntaxandhtml.syntax.Make
processResultasync and let a tap rename the asset it rewrote.Allow optional filesystem cache build dependencies.
Add
output.environment.topLevelAwaitand await every async ESM entry.Add
unusedSymbolsandpseudoClasses, and evaluate a CSS color function.Drop an implied shorthand slot, fold a math function, tighten color conversion.
Add
module.parser.javascript.specNamespaceObjectfor spec namespace objects.Drop what is already said or only a gone engine reads, add
lowerUnsupported.Add
normalizeUrlAttributes,mergeScripts, boolean and token switches.Minify an event handler attribute, and name the production each script body is.
Add source-map, asset, module, bailout, federation hints; group config checks.
Lower CSS nesting,
:dir()and custom at-rules; gate case folding and escapes.Add
optimization.minimize.css.mergeDistantRulesto join rules across a gap.
Patch Changes
Minify an embedded body through the embedded path, dropping three html options.
Take a minified
styleattribute's answer whatever quoting it needs.Name chunk imports in the chunk loader, not at each import site.
Repair hashed names; under HMR bake hashed url maps and reload moved css names.
Enable
output.moduleformoduleandmodern-modulelibrary types.Name an anonymous
export default classbefore its static initializers run.Throw on a non-optional read past an undefined
DefinePluginmember.Reject a fulfilled async cycle member with the cycle's evaluation error.
Escape external requests in generated ESM imports and star reexports.
Fix stack overflows in ESM library star reexport cycles with externals.
Preserve live bindings when reexporting external ESM exports.
Use configured external requests in ESM star reexports; reject property paths.
Preserve import attributes on ESM library star reexports of externals.
Fail the build when a runtime module's code generation throws while hashing.
Settle a css chunk load without a DOM where its stylesheet cannot be read.
Await a deferred import's async dependency that is evaluating-async.
Keep a color the CSS minifier would round where its channels are read back.
Refresh a cached module's
resolveOptionsfrom the factory, not the pack.Read a
<script type>decoded, so a reference-spelled type is minified.Read the extension out of a path-scoped rule's alternation, class or braces.
Keep an HTML attribute name or list token holding a foreign template delimiter.
Answer a name a module does not export from the spec namespace.
Give a deferred namespace the spec's exotic shape when the exports are known.
Give a JSON, text or CommonJS namespace the spec's exotic shape and identity.
Report a missing asset instead of a code generation deadlock.
Keep a concatenated CommonJS reference a separate statement, guarding it once.
Keep CSS module exports for a direct loader
importModule()call.Fix
import.metaandrequire.main, and scope-hoistimport.meta.main.Honor
resolve.fileSystemand say wheremodule.exprContextCriticalmoved.Release stale compilation data from nested children and idle watch builds.
Resolve a
@valueonce and then localize it, wherever it names an identifier.Release the printed-text store's text when the CSS printer drops it.
Skip a foreign dependency whose
isLazyis a flag when walking a lazy barrel.Move diagnostics to
buildInfo.diagnostics, persisting parse-time bailouts.Invalidate consumer codegen when an inlined export value changes.
Rebuild DelegatedModule when DLL manifest metadata changes.
Keep a CSS layer's blocks in order where one of them streams.
Refuse inlining const exports across sync cycles with binding reads.
Escape a text run ending in
</, which the tag after it made a comment of.Skip JS render sentinel scans on chunks without HTML.
Minify an attribute by what its value says, not by how the source spelled it.
Cut allocation and scanning in the CSS and HTML printers, output unchanged.
Emit less chunk-loading runtime.
Recognize the reflected attributes of
frame,frameset,marqueeanddir.Drop the
neo-asyncdependency in favor of a faster built-in async helper.Speed up cache serialization by cutting per-object lookups and call frames.
Match acorn on
**arrows, LS/PS cooking, string export names,programreuse.Parse a regexp literal the running engine cannot build, and keep locations.
Parse without acorn, serialize parse-error locations, trim walker allocations.
Drop the
acorndependency in favor of webpack's own JavaScript parser.Name HTML chunks after their tags' urls, drop the JS copy, type
text/html.
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.