NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #825 most downloaded on npm
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Last release 16 days ago
18 Sep 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
889 releases · first in 2012
Remove broken postinstall script
application/json, text/javascript, application/javascript, application/node, application/wasm are supported by default as mimetype
application/json, text/javascript, application/javascript, application/node, application/wasm are supported by default as mimetypeRule.mimetype to match mimetype in rulessplitChunks.maxAsyncRequests and splitChunks.maxInitialRequests has been increased to 30data-webpack has now a output.uniqueName + ":" prefixdata-webpack is not used when no output.uniqueName is specifiedmodule.hot.accept is now parsedstats: true now normalizes to stats: { preset: "normal" }output.jsonpScriptType to output.scriptType as it's now also used for other things than jsonp (e. g. script externals)One column per quarter.
add script external type, which allows to load a global from a script tag
script external type, which allows to load a global from a script tagentry: {} for no entriesimport() for used exports
/* webpackExports: "default" *//* webpackExports: ["named", "default"] */"exports" field in package.jsonresolve.restrictions to restrict the paths a request can resolve toscript as remoteType by defaultshared: ["package", "package/sub/path"])
requiredVersion will be extracted from package.json of the consumer automatically
packageName option allow to choose the package name for the dependencies lookup (or dev/peer/optionalDependencies)requiredVersion: false allows to disable thisimport "package". The next package.json for the referencing module is used to determine a requiredVersion. The resolved result will be provided as shared module in the version of the package.json at the resulting location.shared: ["./relative/path"])
contextrequiredVersion by default. Only when specified or packageName is specified./ in shared (like shared: ["package/"])
Cannot read property 'hot' of undefined.Modifications to compilation.asset after sealing are deprecated
move-file dependency requires node >= 10.17, while webpack is intended to be >= 10.13 compatible. This temporary increases the min node version for this beta release until we found a solution to that.~
export * uses more exports info data for better exportsexport * no longer flags the default export as maybe providedpromise external, which is like var but awaits the global value in a async moduleimport external, which uses import() to load a native ESMoutput.importFunctionName to change the import() to something else, e.g. to a polyfill../ (BREAKING)Dates are serializableprocessAssets with stagescompilation.asset after sealing are deprecatedadded experimental "Module Federation" - a way to load modules from separate builds into one application
default in CommonJsgenerate and expose typescript typings from webpack
__system_context__ as context from System.js when using System.js as libraryTargetmodule.hot.invalidate() API to trigger an additional hot update of this moduleDefinePluginReferenceError: xxx is not defined where some pure expression where not be removed from the codeextends in class when class is unusedDefinePlugin with -0optimization.sideEffects, optimization.innerGraph and optimization.usedExports are on by default now (only production before)
optimization.sideEffects, optimization.innerGraph and optimization.usedExports are on by default now (only production before)
serve property from schema
output.library
output.library: { type, name, export, auxiliaryComment, umdNamedDefine }library in the entry optionentry: { main: { ... } }import: list of modulesfilename: custom filename template
output.chunkFilename is no longer recommended and only output.filename should be used nowdependOn: list of other entrypoint which are expected to be available on pagelibrary: library exposingpercentBy option to ProgressPlugin to change percent calculationoutput.uniqueName option
output.jsonpFunctionCompiler/Compilation.cache property read-only to make it easier to fix compat issuesDid you mean to error message for some common configuration mistakesexport * in a circular waythis.getOptions in loader context
this.getOptions in loader context
generator.filename support for type: "asset"/"asset/resource"Rule.optionswatchOptions.aggregateTimeout: 0output.hotUpdatefunction/jsonpFunction/chunkCallbackName when output.library is an arraytarget: "node" chunk loading when output files are in different folders"use asm" codehandled sourceRoot in SourceMaps from modules/loaders
sourceRoot in SourceMaps from modules/loadersawait is used, but other async module is importedentryOnly: false/*#__PURE__*/ is applied to function calls when doing innerGraph analysisentryOnly of the DllPlugin to truewebpack:// urls in SourceMaps to provided paths relative to webpack root contextshow error when mimetype is missing for type: "asset"
type: "asset"require("x").fn(require("x"))deprecate using string loader option in config
no ChunkGraph assigned crash when using HMR and the mini-css-extract-plugineval()this.loadModule and show error in this caseoptionsadd Tree Shaking for some CommonJS constructs
exportType: "default" into separate defaultObject: true|false|"redirect"|"redirect-warn" propertyadd parser.parse option for json module type
parser.parse option for json module typeasset asset/resource asset/inline asset/sourceparser.dataUrlCondition optiongenerator.dataUrl optionresolve.pluginshasOwnProperty helper function to runtime to reduce size of other runtime codeadd deprecation codes to all deprecations
Compiler.modifiedFiles with a Set of all modified files in this watchRundefaultVendors to allow webpackChunkName for vendor-only chunksstats.errorDetails and stats.errorStacksmappings of null (Persistent Cache)Multiple assets emit different content to the same filename is an error nowexportsType = "named" to exportsType = "default"fixes non-deterministic order of entry modules in hashing
Fixes incorrectly inverted logic for cacheWithContext in ResolverCachePlugin
cacheWithContext in ResolverCachePluginadd dependencies to ProgressPlugin, enabled by default
dependencies to ProgressPlugin, enabled by defaultnpm fundsource-map devtools)resolve.cacheWithContext now, which defaults to falsesetImmediate instead of process.nextTick to schedule the next task
fix WatchIgnorePlugin (but it's still deprecated)
optimization.mangleExportsoptimization.usedExportsFileSystemInfo log warnings, errors and the first 40 paths that contribute to invalid snapshotsmake RequireIncludeDeprecationWarning serialize-able
getDependencyReference, instead split method into parts and use them on demand
getModule -> ModuleGraphConnection.moduleimportedNames -> getReferencedExports()weak -> Dependency.weakorder -> HarmonyImportDependency.sourceOrderWatcher.invalidateimport() after it the promise was rejecteddeprecate require.include and emit a warning when used
(false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map)minChunkSize from LimitChunkCountPluginrequire.include and emit a warning when used
parser.requireIncludestats.errorStack option to display webpack-internal stack trace of errorsString.concatcache.store option, only supporting pack modewebpack.JavascriptModulesPlugins -> webpack.javascript.JavascriptModulesPluginsPlease see feedback issue here: https://github.com/webpack/webpack/issues/9802
First beta version. :tada:
Please see feedback issue here: https://github.com/webpack/webpack/issues/9802
output.ecmaVersion can be 5 - 11 or 2009 - 2020
output.ecmaVersion can be 5 - 11 or 2009 - 2020Bundle templating has been refactored. MainTemplate/ChunkTemplate/ModuleTemplate were deprecated and the JavascriptModulesPlugin takes care of JS temp…
(based on 4.41.0)
Bundle templating has been refactored. MainTemplate/ChunkTemplate/ModuleTemplate were deprecated and the JavascriptModulesPlugin takes care of JS templating now.
Before that refactoring JS output was handled by Main/ChunkTemplate while other output (i. e. WASM, CSS) was handled by plugins. This looks like JS is first class, while other output is second class. The refactoring changes that and all output is handled by their plugins.
It's still possible to hook into parts of the templating. The hooks are in JavascriptModulesPlugin instead of Main/ChunkTemplate now. (Yes plugins can have hooks too. I call them attached hooks.)
There is a compat-layer, so Main/Chunk/ModuleTemplate still exist, but only delegate tap calls to the new hook locations.
Instead of starting bundle execution when a require call, webpack can inline the code of the entrypoint under some conditions now. This means execution starts directly with the first module. This module is inlined into the bundle without module wrapper function.
The new RuntimeModule architecture allows to add runtime code only when needed. This release reaches a final milestone for this. All runtime code is correctly flagged and only added when needed. This means under some conditions, when no runtime code is needed, we can generate a bundle without runtime (example). In other cases we generate very small runtimes.
(experimental: experiments.outputModule: true)
A new option output.module allows to generate output files in a way that <script type="module"> is used. This has multiple effects:
<script type="module"> too (output.jsonpScriptType: "module")output.iife: false)In future this also means:
output.libraryTarget: "module")import to import another moduleoutput.terserVersionModule.source() and Module.getRuntimeRequirements() are deprecated in favor of Module.codeGeneration()stats.ids has been added
stats.toString() is usedstats.chunkModulesSort stats.chunkRootModulesSort stats.nestedModulesSort has been added to sort the different module listsstats.modulesSort is "depth" by default nowstats.chunkModulesSort is "name" by default nowstats.chunkRootModulesSort is "name" by default nowstats.nestedModulesSort is false by default nowstats.children is false for toString() by default nowchunk.idHints asset.chunkIdHints asset.auxiliaryChunkIdHints to stats jsonfixes handling of circular references in modules in Tree Shaking (optimization.innerGraph)
(based on 4.41.0)
module._source after module as been already parsedfixes handling of circular references in modules in Tree Shaking (optimization.innerGraph)
(based on 4.41.0)
add a lot of checks, compat-layers and deprecated methods to allow mini-css-extract-plugin work unmodified
(based on 4.41.0)
The assetEmitted hook has different arguments now.
(based on 4.40.3)
assetEmitted hook has different arguments now.
{ content: Buffer, source: Source, compilation: Compilation, outputPath: string, targetPath: string }fix a bug where unused pure expression was inserted into dead branches and caused invalid code
(based on 4.39.3)
unused pure expression was inserted into dead branches and caused invalid codefix a bug with the new scope analysis and side-effect-free modules
(based on 4.39.3)
"Deep Scope Analysis": top level symbols are now tracked in modules when optimization.innerGraph is on (it's on by default in production mode)
(based on 4.39.3)
optimization.innerGraph is on (it's on by default in production mode)
/*#__PURE__*/__webpack_exports_info__.usedExports to get a list of used exports (mainly of testing)add option output.ecmaVersion to specify level of generated code emitted by webpack
(based on 4.39.3)
output.ecmaVersion to specify level of generated code emitted by webpack
export defaultoutput.ecmaVersion from implict 5 to 2015
output.ecmaVersion: 5.Improve ASI detection to avoid Object(...) in favor of (0,...)
(based on 4.39.2)
Object(...) in favor of (0,...)
__webpack_require__.d into a single statement
track dependencies while resolving build dependencies to snapshot them
(based on 4.39.2)
cache.immutablePaths, similar to cache.managedPaths but assumes that existing content of this folder never changes. Defaults to yarn cache when PnP is used.node_modules/.cache/webpack when package.json exists somewhere above cwd, .pnp/.cache/webpack when .pnp.js exists, .cache/webpack otherwise.__webpack_exports_info__ module APICompilation/NormalModuleFactory.file/context/missingDependencies are now LazySets
(based on 4.39.2)
Compilation/NormalModuleFactory.file/context/missingDependencies are now LazySetscache.managedPaths. It is an array of package-manager only managed paths. webpack will avoid hashing/timestamping them, assume the version is unique and will use this as snapshot (for both memory and filesystem cache).
node_modules directories.cache.managedPaths defaults to the node_modules directory webpack is inside of.cache.buildDependencies. It is an object of arrays of additional code dependencies of the build. webpack will use an hash of these items and all dependencies to invalidate the filesystem cache.
cache.buildDependencies.defaultWebpack defaults to webpack/lib to get webpack and all dependencies.cache.buildDependencies.config: [__filename] in webpack.config.js to get the config and all dependencies.validateSchema API now throws an Error instead of returning an Array of Errorscache.loglevel
infrastructureLogging.level insteadPut deprecation stuff for Sets in prototype instead of on every instance
(based on 4.39.1)
afterDone hook to CompilerwatchOptions.followSymlinkswebassembly/async-experimental to webassembly/asyncwebassembly/experimental to webassembly/syncexperiments.syncWebAssemblyexperiments.asyncWebAssemblyasset module type experiment
experiments.assetoutput.assetModuleFilename (string or function)type: "asset" for asset module type in rulesasset examplesfiles and auxiliaryFiles for chunk assets
stats.loggingDebug: /webpack/)Compilation.hooks.stillValidModule similar to failedModule and succeedModule when a module has been taken from cacheresolve.alias when array (properties are now required)idleTimeout to persistent caching implementationstats.cachedAssetstoLocaleDateString and toLocaleTimeString for performance (intl need to be initialized)cache.idleTimeout to 60s instead of 10supdate enhanced-resolve to new major: see https://github.com/webpack/enhanced-resolve/releases/tag/v5.0.0-beta.0
(based on 4.35.3)
resolve.alias: { something: ["a", "b"] }resolve.alias: { something: false } to ignore modulefix an internal use of a deprecated API
(based on 4.35.2)
output.filename and splitChunks...filename to be a functionignored is added again, avoid fs.watchFile for own polling)name multiple times in splitChunksNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
[Security] - Add support for md4 in Node >=18. by @iclanton in https://github.com/webpack/webpack/pull/17628
Full Changelog: https://github.com/webpack/webpack/compare/v4.46.0...v4.47.0
fix behavior of defaults for resolve.roots to be backward-compatible
resolve.roots to be backward-compatibleresolve server-relative requests relative to project context by default
splitChunk minSize is not handled correctlysplitChunk cacheGroups is not handled correctlymake sure to generate correct chunk connection for blocks that are only connected in some runtimes
fix bug in sideEffects optimization when using export * from "non-esm" and a default export.
export * from "non-esm" and a default export.Not set by default to avoid breaking change
sideEffects flag behavior when dynamic modules are part of the tree
splitChunks.enforceSizeThreshold to allow enfore splitting larger chunks unrelated from other limiations
resolve.roots and default resolve.roots: [context]
/src/abc) to the project root (or other locations when configured)minSize is set to 0
NaNs in some places which breaks orderingYour coding agent can read these notes before it upgrades. Set up the MCP server →