webpack
5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed
5.113.0 is the newest release of 5.x.
In short
8 new2 faster15 fixed
Release note
Minor Changes
Allow resolving worker module by export condition name when using
new Worker()Detect conditional imports to avoid compile-time linking errors for non-existent exports.
Added the
tsconfigoption for theresolveroptions (replacement fortsconfig-paths-webpack-plugin). Can befalse(disabled),true(use the defaulttsconfig.jsonfile to search for it), a string path totsconfig.json, or an object withconfigFileandreferencesoptions.Support
import.defer()for context modules.Added support for array values to the
devtooloption.Improve rendering node built-in modules for ECMA module output.
Unknown import.meta properties are now determined at runtime instead of being statically analyzed at compile time.
Patch Changes
Fixed ESM default export handling for
.mjsfiles in Module FederationOptimized
import.meta.envhandling in destructuring assignments by using cached stringified environment definitions.Respect the
stats.errorStackoption in stats output.Fixed a bug where declaring a
modulevariable in module scope would conflict with the defaultmoduleArgument.Fix VirtualUrlPlugin to set resourceData.context for proper module resolution. Previously, when context was not set, it would fallback to the virtual scheme path (e.g.,
virtual:routes), which is not a valid filesystem path, causing subsequent resolve operations to fail.Fixed Worker self-import handling to support various URL patterns (e.g.,
import.meta.url,new URL(import.meta.url),new URL(import.meta.url, import.meta.url),new URL("./index.js", import.meta.url)). Workers that resolve to the same module are now properly deduplicated, regardless of the URL syntax used.Reuse the same async entrypoint for the same Worker URL within a module to avoid circular dependency warnings when multiple Workers reference the same resource.
Fixed a bug where a self-referencing dependency would have an unused export name when imported inside a web worker.
Fix missing export generation when concatenated modules in different chunks share the same runtime in module library bundles.
Fixed
import.meta.env.xxxbehavior: when accessing a non-existent property, it now returns empty object instead of full object at runtime.Improved parsing error reporting by adding a link to the loader documentation.
Fix typescript types.
Add declaration for unused harmony import specifier.
Fix compressibility of modules while retaining portability.
Optimize source map generation: only include
ignoreListproperty when it has content, avoiding empty arrays in source maps.Preserve star exports for dependencies in ECMA module output.
Consider asset modulem to be side-effect free.
Avoid generating JavaScript modules for CSS exports that are not used, reducing unnecessary output and bundle size.
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.