Packages

webpack

5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed

Your version

5.105.0

3 Feb 2026Where it was published

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 tsconfig option for the resolver options (replacement for tsconfig-paths-webpack-plugin). Can be false (disabled), true (use the default tsconfig.json file to search for it), a string path to tsconfig.json, or an object with configFile and references options.

  • Support import.defer() for context modules.

  • Added support for array values ​​to the devtool option.

  • 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 .mjs files in Module Federation

  • Optimized import.meta.env handling in destructuring assignments by using cached stringified environment definitions.

  • Respect the stats.errorStack option in stats output.

  • Fixed a bug where declaring a module variable in module scope would conflict with the default moduleArgument.

  • 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.xxx behavior: 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 ignoreList property 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.