webpack
5.112.2 · 23 Oct 2026MIT74.8M / weekRepositorynpmAtom feed
Where each line stands
Plan an upgrade- 5.x5.112.2Safe from 5.104.1Latest line
- 4.x4.47.0No known advisoryTo 5.112.2
- 3.x3.12.0No known advisoryTo 5.112.2
- 2.x2.7.0No known advisoryTo 5.112.2
- 1.x1.15.0No known advisoryTo 5.112.2
- 0.x0.11.18No known advisoryTo 5.112.2
Latest releases
All 585 releases5.112.2
23 Oct 2026Reduce repeated scans when concatenating imported modules.
Avoid allocating CSS module sets for single-group chunks.
Return the value of every module type loaded with
importModule().
5.112.1
22 Oct 2026- removed
Drop more unused functions, arguments, calls, global reads and variable copies when minifying JavaScript.
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.
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.
5.112.0
15 Oct 2026- deprecated
Export more plugins under their scope, move eleven loose exports under theirs, deprecate the old, and expose
template.DependencyTemplate,module.NullFactoryandutil.makeSerializable. - deprecated
Rename the
Harmony*names toESM*and deprecate the old spellings. - breaking
Require
minimizer-webpack-plugin5.12, so inline scripts in HTML minify again.
Minor Changes
Apply
pluginsset on a multi-configuration array to theMultiCompiler.Add
optimization.minimize.css.dropOverriddenDeclarations, dropping a declaration a later one overrides where no target is named.- deprecated
Export more plugins under their scope, move eleven loose exports under theirs, deprecate the old, and expose
template.DependencyTemplate,module.NullFactoryandutil.makeSerializable. Let
util.makeSerializabletake several requests, current one first.Emit the source map
scopesfield, so a debugger resolves imported ESM bindings by name.Add
library.entryExports: "all"to expose the exports of every entry module.Recognize a required
constbinding assigned toexportsas a re-export.Accept glob patterns in more path, module and file filter options.
Bundle a run of inline
<script>tags into one chunk the page can inline.Add
module.parser.javascript.topLevelThisfor classic-scriptthissemantics.Add
module.parser.html.chunkNameand awebpackChunkNamecomment for tags.Add
include/excludeversion and request filters to shared modules.Keep module side-effect information in ESM output as PURE annotations.
Add
optimization.splitChunks.dedupDepthto discover chunk intersections.Add
optimization.minimizeOptions.json, on by default withfutureDefaults.Add
SSRManifestPluginand fix server-rendered CSS collection and adoption.Add an
ignorehook tooutput.copyand keep unfollowedfromsymlinks.Add
optimization.minimize.css.convertApproximateColors.Add XML parsing and SVG/XML minification with data URLs and attribute sorting.
Extract CSS/HTML license comments like JS and safely shorten CSS gradients.
Resolve an async
DefinePlugin.runtimeValueover an asyncbeforeParsehook.Add CSS
customMedia/customSelectorsminimize options; resolve chained names.- deprecated
Rename the
Harmony*names toESM*and deprecate the old spellings. Reduce
css.syntax/html.syntaxtoparser,printer,SourceProcessorwith one node path.Add a JavaScript
SyntaxTreeread like the CSS one, andtoEstreeObject.Fix minified code that threw, and add
pure_conversionsandpure_heritage.Shorten more CSS values and selectors, fold longhands, order declarations and gather layer blocks.
Add
optimization.minimize.css.charset;falsedrops@charsetfor UTF-8 CSS.
Patch Changes
Join rules a gathered
@layerleaves adjacent, and an at-rule with a later one
stating the same condition; read what a condition declares.Read escaped CSS names and functions as spelled, and minify them unescaped.
Minify JavaScript, CSS and HTML assets whose names carry a
#fragment.- breaking
Require
minimizer-webpack-plugin5.12, so inline scripts in HTML minify again. Minify the attributes of an HTML tag without rewriting the template in it.
Order joined at-rule selector lists and gather a repeated large
@layerblock.Preserve case-sensitive template identifiers when minifying HTML tag attributes.
Match Acorn's strict directives, Unicode identifiers and expression validation.
Skip concatenating modules when
optimization.providedExportsis disabled.Join rules a nesting lowering or duplicate drop left for a second pass.
Write U+00A0 in a minified HTML attribute as the character, not
.Escape a foreign
<script>or<style>body, which is character data.Name the runtime module whose generation fails while hashing.
Rebuild a module in watch when its missing unused dependencies swap.
Rebuild in watch mode when a file is deleted while a build is running.
Read a foreign
<script>or<style>body as character data, not as raw text.Keep an inline
<style>body as written when rebuilding a page webpack emitted.Fix minified HTML for
stylespellings, CSS quotes,<noscript>and a BOM.Record a build dependency required through a spread on Bun.
Write a nested selector opening on a combinator against its parent the way the printer writes one.
Fix missing async stylesheets with a shared runtime.
Support deferred imports introduced by hot updates.
Fix trailing commas in
require.resolve()andrequire.resolveWeak()calls.Keep regular expressions, functions and plugins distinct in resolver caches.
Order the list a lowered nested selector lands in on what is written, not on what was.
Hoist a vendor-prefixed nested rule for a target that reads no nesting.
Name a hoisted nested rule in the dark-scheme copy it writes.
Minify data: URL payloads in HTML attributes and
new URL, and web manifests.Fold a fallback's colors over the author's arguments, and print with
recurseBlocks: falserather than throwingRead a regular expression repeating a capture group name in linear time.
Make lazy barrels defer import declarations and keep no deferral across compilations.
Invalidate unaffected caches when connection activity or async status changes.
Order concatenated re-exports deterministically when their source order ties.
Regenerate a module's exports when a require() cycle forms or breaks around it.
Recompute re-exports, code and warnings when a module goes missing or returns.
Preserve loader resolution dependencies across cached rebuilds.
Read unwatched changes afresh and wait for restarted watch compilers to finish.
Parse loader output for
.wasmas JavaScript when async wasm is auto-enabled.Remove modules an async chunk inherits from a named parent chunk grown later.
Fix JavaScript minifier crashes, altered behavior, lost comments, unparsable output and null source map sources, including parameter aliases, ESTree trees and preserved names, and stop it writing into the caller's parse options.
Preserve the source phase of dynamic WebAssembly import contexts.
Await every async entry before resolving an ESM library import.
Keep unknown
import.metaproperties per module, alike for aliases and direct use.Return WebAssembly modules directly from eager and weak source imports.
Handle missing ESM hot update manifests in Node.js without failing HMR checks.
Speed up JavaScript parsing: comment lookup, the tokenizer and the grammar.
Prefix and drop 2009 flexbox names, keeping them where a box lays out by them.
Keep
initialwhere Gecko or WebKit reads the property's keyword apart.Fold
calc()as lightningcss does, keeping it where a bare value is refused.Keep a
color-mix()whose hue rests on a gray's conversion residue.Keep a shorthand's initial keyword where it parts two keywords of another slot.
Group
lib/andlib/dependencies/sources into directories.Treat a browserslist target given at a bare major version (e.g.
safari 10) as<major>.0when a feature's first supported version is a[major, minor]pair, so it is no longer reported as unsupported.Keep the last HMR update with
output.clean; stop rechecking removed files.Read and print a CSS backslash as the spec does, and a NUL as U+FFFD.
Make minified CSS and HTML stable on a second pass, even for truncated input.
Minify a merged
<style>run as one sheet, closing each where its input ended.Minify JavaScript with webpack's printer under
futureDefaults,terserotherwise.Preserve
wrappedContextRegExpflags when rebuilding context request matchers.Minify CSS
@supports,@importand@custom-mediaconditions, and exponent numbers.Fold unitless
hsl()/hwb()channels, and only where the separators are valid.Split
@valueimports on thefromkeyword, not a substring in the path.Destructure a dotted
DefinePluginkey whose value is falsy or a runtimeValue.Make
Stats.hasErrors()read errors through theprocessErrorshook (viagetErrors()), matchinghasWarnings(), so a plugin that filters errors out of the hook is no longer contradicted byhasErrors().Allow wrapping an external concatenated module, now asked of the module itself, and re-exporting a JSON or asset
defaultas a namespace object.Match
urlHintsrules written withand,or,notandglobconditions; profile hook map taps, such as resolver and parser hooks, inProfilingPlugin; reportimport.metaoption errors insiderequire.ensurecallbacks, not crash; and replaceany,objectandFunctionwith precise types in the type definitions.Reduce CSS and HTML build time and memory allocation.
Reuse free names instead of re-parsing modules for the entry IIFE rename.
Release each module's ast once scope-analysed, and encode each export path once.
Export a module library entry's default expression as its own binding, and keep
the export helpers where the entry is not inlined.Give a wrapped concatenated body the same function header as a module factory.
Skip reading every asset when no content hash is named.
Cut graph, cached set, lazy barrel and ESM import memory and allocations.
Stop a module source from being held as both a string and a buffer.
Read the browserslist data and options schema only when a build needs them.
Release the eval devtool's cached module sources after wrapping them.
Release the rendered module sources after emitting the chunks.
Cut the peak memory and time of minifying through webpack's printer.
Shrink minified JS: unwrap IIFEs, fold calls, drop dead code, split arrays.
Cut JavaScript minifier time and memory; keep token positions in large inputs.
Keep the
calc()around asteps()countjump-nonewould reject bare.Split the CSS syntax module into a parser file and a printer file.
Split the HTML syntax module into a parser file and a printer file.
Rename classes in
lib/so each says what it does and no two share a name.Keep the remote fallback index aligned with registered container externals when an
internalexternal precedes a real one.Stop a minified inlined chunk leaving a doubled
;in its<script>.Stop
mergeDistantRulesmangling rules or reorderingall, and merge more.Minify by parsing with webpack's own parser rather than terser's.
Read JavaScript with webpack's parser alone when minifying, refusing early errors.
Parse an
assert(...)call after an import with no semicolon, and a regular expression afteryieldin a generator method.Keep the private names a direct
evalreads when mangling.Keep a class dropped for its effects where they read a private name it declares.
Parenthesize the right side of a private
in, ayield,await, privateinor optional chain tagging a template, and aletorasyncstarting a statement or loop head, where the minifier printed code that no longer parsed or read otherwise.Keep a name a parameter list or catch parameter reads from resolving to what the function body or catch block declares, which the minifier renamed or dropped as unused.
Scope and export a CSS Modules
@valuethe same way whether local or imported.Keep CSS
border: noneand gradient fallbacks for units a target cannot read.Keep minified CSS safe for older browsers; drop dead fallbacks and overrides.
Keep CSS rules apart from a neighbor whose selector no browser parses.
Keep an
:nth-*()argument with a space after its sign as written.Keep minified CSS readable by browsers the compat data does not cover.
Keep a module its chunk still needs after
compilation.rebuildModule().Keep a CSS rule nested under a selector opening on a combinator when lowering.
Use module paths for webpack's built-in minimizers so parallel minification can load them directly in workers instead of serializing their function sources.
Keep stats from an earlier build readable after a later build no longer has one of their modules.
Dependency tracking · free for 3 projects
Know when your own dependencies move
webpack had 2 security advisories in the last 12 months. inlinr emails you the day one touches a project of yours, with the version that fixes it.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Registry facts last checked 6 Nov 2026. Releases and advisories last read 6 Nov 2026.