Packages

webpack

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

Your version

5.12.0

8 Jan 2021Where it was published

5.113.0 is the newest release of 5.x.

In short

4 new7 fixed5 changed

Security

2 advisories affect 5.12.0; 5.94.0 fixes them

Release note

Features

  • Add experiments.layers

    • entry.xxx.layer: "name-of-layer" allows to set the layer for an entrypoint

    • module.rules.issuerLayer: RuleCondition allows to filter/match by layer of issuer

    • module.rules.layer: "name-of-layer" allows to set the layer of an module

    • splitChunks.cacheGroups.xxx.layer allows to select modules by layer

    • externals.byLayer["name-of-layer"] allows to specify externals by layer

    • externals.byLayer: (layer) => ... allows to specify externals by layer

    • externals function has an additional argument property contextInfo which contains info about the issuer (e. g. the layer)

  • Add module.parser and module.generator options to allow to specify parser/generator options globally per module type

  • Make chunkId variable available in script tag hook (like it was with webpack 4)

Bugfixes

  • Escape exclamation marks in context regexp when generating readable module names/ids

  • Fix a problem when bundling webpack bundles with enabled eval-based devtools

  • Add stats.nestedModulesSpace to schema to allow to specify this option

  • Fix a bug that incorrectly replaces new.target with constants

  • Fix a bug where splitChunk minSize is not handled correctly

  • Fix a bug where the order of splitChunk cacheGroups is not handled correctly

  • Avoid adding non-filesystem resources as dependencies for watching and caching

Developer experience

  • Fix incorrect negation in hint comment for eval-based devtools

  • Improve error messages of "Library/Chunk Loading/Wasm Loading typeof is not enabled" errors

  • Improve question message when asking to install webpack-cli

  • Show a warning when loaders/plugins report invalid dependencies to webpack

Contributing

  • Examples use webpack-cli 4 now

  • Rename memorize to memoize

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.